Cannot retrieve file pointer positions in SAM file

Hello,

I am receiving the following error. I am working with SAM files that were exported from CLC, then edited with Picard-tools to addReadGroups. I am not sure if I need to add an additional step to solve this problem, I cannot find any documentation regarding this error.

Please let me know what I need to do to correct this issue.

Thank you!

gatk -T HaplotypeCaller -R spinach_assembly-repeatdetect_PACBIO_V1.3_formated_60.fa -I .sam.list -drf DuplicateRead --alleles Unfiltered_Spinach_PacBio_Reseq_12_Geno_Assay_SNP.fixed.noblanks.vcf --genotyping_mode GENOTYPE_GIVEN_ALLELES --output_mode EMIT_ALL_SITES -o output_raw_unfiltered_spinach_snps_gbs.vcf<br /> INFO 14:48:44,450 HelpFormatter - ---------------------------------------------------------------------------------<br /> INFO 14:48:44,453 HelpFormatter - The Genome Analysis Toolkit (GATK) v3.4-46-gbc02625, Compiled 2015/07/09 17:38:12<br /> INFO 14:48:44,454 HelpFormatter - Copyright (c) 2010 The Broad Institute<br /> INFO 14:48:44,454 HelpFormatter - For support and documentation go to http://www.broadinstitute.org/gatk<br /> INFO 14:48:44,458 HelpFormatter - Program Args: -T HaplotypeCaller -R spinach_assembly-repeatdetect_PACBIO_V1.3_formated_60.fa -I .sam.list -drf DuplicateRead --alleles Unfiltered_Spinach_PacBio_Reseq_12_Geno_Assay_SNP.fixed.noblanks.vcf --genotyping_mode GENOTYPE_GIVEN_ALLELES --output_mode EMIT_ALL_SITES -o output_raw_unfiltered_spinach_snps_gbs.vcf<br /> INFO 14:48:44,468 HelpFormatter - Executing as [email protected] on Linux 2.6.18-348.12.1.el5 amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_05-b13.<br /> INFO 14:48:44,469 HelpFormatter - Date/Time: 2015/07/31 14:48:44<br /> INFO 14:48:44,469 HelpFormatter - ---------------------------------------------------------------------------------<br /> INFO 14:48:44,470 HelpFormatter - ---------------------------------------------------------------------------------<br /> INFO 14:48:45,102 GenomeAnalysisEngine - Strictness is SILENT<br /> INFO 14:48:45,385 GenomeAnalysisEngine - Downsampling Settings: Method: BY_SAMPLE, Target Coverage: 500<br /> INFO 14:48:45,394 SAMDataSource$SAMReaders - Initializing SAMRecords in serial<br /> INFO 14:48:48,432 SAMDataSource$SAMReaders - Init 50 BAMs in last 3.04 s, 50 of 80 in 3.04 s / 0.05 m (16.46 tasks/s). 30 remaining with est. completion in 1.82 s / 0.03 m<br /> INFO 14:48:50,052 SAMDataSource$SAMReaders - Done initializing BAM readers: total time 4.66<br /> INFO 14:48:50,164 HCMappingQualityFilter - Filtering out reads with MAPQ &lt; 20<br /> INFO 14:48:54,742 RMDTrackBuilder - Writing Tribble index to disk for file /local/scratch/scratch/Amanda/Spinach_GBS/Unfiltered_Spinach_PacBio_Reseq_12_Geno_Assay_SNP.fixed.noblanks.vcf.idx<br /> INFO 14:48:58,784 GenomeAnalysisEngine - Preparing for traversal over 80 BAM files<br /> INFO 14:49:00,054 GATKRunReport - Uploaded run statistics report to AWS S3</p> <h5>ERROR ------------------------------------------------------------------------------------------</h5> <h5>ERROR A BAM ERROR has occurred (version 3.4-46-gbc02625):</h5> <h5>ERROR</h5> <h5>ERROR This means that there is something wrong with the BAM file(s) you provided.</h5> <h5>ERROR The error message below tells you what is the problem.</h5> <h5>ERROR</h5> <h5>ERROR Visit our website and forum for extensive documentation and answers to</h5> <h5>ERROR commonly asked questions http://www.broadinstitute.org/gatk</h5> <h5>ERROR</h5> <h5>ERROR Please do NOT post this error to the GATK forum until you have followed these instructions:</h5> <h5>ERROR - Make sure that your BAM file is well-formed by running Picard's validator on it</h5> <h5>ERROR (see http://picard.sourceforge.net/command-line-overview.shtml#ValidateSamFile for details)</h5> <h5>ERROR - Ensure that your BAM index is not corrupted: delete the current one and regenerate it with 'samtools index'</h5> <h5>ERROR</h5> <h5>ERROR MESSAGE: Cannot retrieve file pointers within SAM text files.</h5> <h5>ERROR ------------------------------------------------------------------------------------------

Best Answer

Answers

  • ahulseahulse Member

    Additionally when I run ValidateSamFile I receive errors involving NM tag (nucleotid
    e differences) is missing. I am not sure how to correct this and if this is what is generating the other error.

  • SheilaSheila Broad InstituteMember, Broadie, Moderator

    @ahulse
    Hi,

    I am not sure if the -I file can have a .list extension. Can you try renaming the file to a .bam file? Also, please post the exact error message you get from Picard's Validate Same File.

    Thanks,
    Sheila

  • Hi Geraldine,

    You are right, it had been awhile since I used GATK last time and forgot it only accepts bam format. That solved the problem. For people using many files, the .list option is very useful and what I have been using.

Sign In or Register to comment.