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.