IGV error: Invalid pointer file when trying to view bam
1
0
Entering edit mode
18 months ago
Joseph ▴ 10

I am trying to visualize my read pile up across a small section of genome using IGV. My initial bam files were aligned using STAR to a version of the GRCh38 genome from ensembl. I have followed posts and suggestions to sort, index, and grab my particular region of interest using the following code:

samtools sort /blue/berglund/j.ellis/CoregPub/RNAseq/ddHEK_RNAseq/STAR/01_HEK_d0_22Aligned.sortedByCoord.out.bam -o /blue/berglund/j.ellis/CoregPub/RNAseq/ddHEK_RNAseq/YBX3_bams/01_HEK_d0.samsorted.bam

samtools index /blue/berglund/j.ellis/CoregPub/RNAseq/ddHEK_RNAseq/YBX3_bams/01_HEK_d0.samsorted.bam /blue/berglund/j.ellis/CoregPub/RNAseq/ddHEK_RNAseq/YBX3_bams/01_HEK_d0.samsorted.bam.bai

samtools view -o /blue/berglund/j.ellis/CoregPub/RNAseq/ddHEK_RNAseq/YBX3_bams/YBX3only_01_HEK_d0.bam/blue/berglund/j.ellis/CoregPub/RNAseq/ddHEK_RNAseq/YBX3_bams/01_HEK_d0.samsorted.bam "12:10699089-10723323"

When using IGV I load the inbuilt human GRCh38/hg38 genome and load my .bam file with my .bam.bai file in the same folder/same nomenclature I get the following error

Error querying alignments for: YBX3only_01_HEK_d0.bam Error message: 
Invalid file pointer: 24801442675677 for C:\Users\joeel\Desktop\YBX3onlyBams\YBX3only_01_HEK_d0.bam

I saw a post saying this is usually because of a bad index file but I am not sure what I am doing wrong if that is the case or what specifically to check. I apologize if you need more information. I am using IGV version 2.14.0 which I used locally on my laptop. My samtools is version 1.9.

IGV samtools genome bam • 1.2k views
ADD COMMENT
2
Entering edit mode
18 months ago
GenoMax 141k

You need to reindex the sub-set BAM you made: YBX3only_01_HEK_d0.bam. In your view command be sure to include -h so the subset BAM gets a header.

ADD COMMENT
0
Entering edit mode

That worked! Thank you.

ADD REPLY

Login before adding your answer.

Traffic: 2052 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6