Hello
I created unmapped bam file from fastq file (sample 1). When I tried to search the bam file using query name, I got the 'Exec format error'
Code:
samtools view 1_ucheck.bam | grep 'A00684:110:H2TYCDMXY:1:1101:2790:1000'
1_ucheck.bam
: unmapped bam file from Sample 1 fastq file
Error:
[E::hts_hopen] Failed to open file 1_ucheck.bam
[E::hts_open_format] Failed to open file "1_ucheck.bam" : Exec format error
samtools view: failed to open "1_ucheck.bam" for reading: Exec format error
I am not sure about this error. Because from the same fastq file (sample 1), could also align with reference sequence and convert it into a bam file. When I tried to search using queryname in this bam file, it did not show any error. It would be helpful, if someone could help to understand the error in the unmapped bam file. Thanks
code:
samtools view alignedsample1.bam | grep 'A00684:110:H2TYCDMXY:1:1101:2790:1000'
alignedsample1.bam
: mapped bam file from sample1 fastq file
output:
A00684:110:H2TYCDMXY:1:1101:2790:1000 99 NC_000012.12 10166659 60 101M = 10166871 313 TGATTGGACAGAAAGCTTCCACTATGTCTCCTTACCCACCCTTCTCCCAATACCTGAACAATTTGCTACTCTCTTCAGTGTTTCTTGGAGATTCAGATTCT FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FFFFFFFFFFFFFFFFF:FFFFFFFF:FFFFFFFFFF:: NM:i:0 MD:Z:101 MC:Z:101M AS:i:101 XS:i:0
A00684:110:H2TYCDMXY:1:1101:2790:1000 147 NC_000012.12 10166871 60 101M = 10166659 -313 GCCGGGCTGAGATCTGTCCCTCCAGTTTCTTTTTCTGGTGAGTTAGGTTTGCTTGCTCTTGTGTTAGGAGGTCAGACACCTGGGATACTGAATCACAGTTG FFFFFFFFFFFFFFFFFFFFFFF:FFFFF,FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NM:i:0 MD:Z:101 MC:Z:101M AS:i:101 XS:i:20
what is your shell ? what is the output of
which samtools
? what is the output offile 1_ucheck.bam
?I am using SAMtools 1.12. There is no output for 1_ucheck.bam file (please find the error given above) and the file size of this unmapped bam file is 9228.78 Mb. I run the scripts in bash shell and schedule the jobs in slurm
Thank you for everyone's input