I want to load bam file and the human_refseq.idx.fa
file to IGV. My questions are:
(1) Should I be loading the indexed file? testes.index
(2) Should the human_refseq.idx.fa
file be loaded as the genome?
I will detail the steps that I used.
First, I obtained the primary assembly and created the RSEM reference:
rsem-refseq-extract-primary-assembly GCF_000001405.31_GRCh38.p5_genomic.fna GCF_000001405.31_GRCh38.p5_genomic.primary_assembly.fna
rsem-prepare-reference --gff3 GCF_000001405.31_GRCh38.p5_genomic.gff --bowtie2 --bowtie2-path ./bowtie2-2.4.5-py39hd2f7db1_2 --trusted-sources BestRefSeq GCF_000001405.31_GRCh38.p5_genomic.primary_assembly.fna human_refseq
I then calculated the expression and align the sequence:
rsem-calculate-expression -p 2 --output-genome-bam --bowtie2 --bowtie2-sensitivity-level "very_fast" --append-names --paired-end s_2_1_sequence.txt s_2_2_sequence.txt human_refseq testes
Next, I sorted and index the bam file:
samtools sort -l 9 -o testes.sorted.bam -@ 4 testes.transcript.bam
samtools index -bc -@ 4 testes.sorted.bam testes.index
Now, I want to use IGV. I want to load the bam file and human_refseq.idx.fa
file to IGV. My attempt:
(1) Go to the IGV.
(2) Click "File"..."Load from file"...and then load the index file testes.index
.
(3) Click "Genomes"..."Load Genome from file"...upload the "human_refseq.idx.fa.fai" file.
I'm wondering if I did it correctly?
IGV wants a samtools fai index, this kind of index is unrelated to RSEM.
The
testes.index
is generated usingsamtools index
command.igv will look for a file named .fai, not .index
So I should load both the bam file and fai index file in addition to the
human_refseq.idx.fa
? Or just bam file and fai index (the latter as genome reference).You do not need to provide
testes.index
file name tosamtools index
command. Process will automatically create atestes.sorted.bam.fai
file using the name of BAM input.