...
| Code Block |
|---|
samtools index input.fasta |
Import to IGV
...
.
From the main window of IGV, click on File -> Import Genome and you should be presented with the following window.
Enter the ID and Name of the Genome you are working with and select the path to your *.fasta file (the index, *.fai file needs to be in the same directory), then select the path to your *.gff file for the Gene File.
Preparing alignment file.
If you do not have an alignment file in the SAM format you may want to start with Introduction to mapping.
To get import an alignment into IGV we first need to convert the file into BAM format, sort and then also index the file.
Convert to BAM format.
| Code Block |
|---|
samtools sort -bS input.sam output.bam
|
Sort.
| Code Block |
|---|
samtools sort input.bam sorted_output
|
Note: The second parameter passed here is a prefix and will be suffixed with .bam by samtools.
Index
| Code Block |
|---|
samtools index input.bam
|
Import to IGV.
From the main window of IGV, click on File -> Load from File and select your input.bam file, after which your screen should look similar to the following:
