IGV error: Invalid pointer file when trying to view bam
Entering edit mode
8 weeks 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 • 275 views
Entering edit mode
8 weeks ago
GenoMax 123k

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.

Entering edit mode

That worked! Thank you.


Login before adding your answer.

Traffic: 2319 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6