Entering edit mode
4.3 years ago
Ada
▴
10
How can I get gsnap to produce sam files with header? I am having difficulty with current dataset.
How can I get gsnap to produce sam files with header? I am having difficulty with current dataset.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
To get help you need to provide command line you are using.
current dataset
conveys no information either.The code breaks at samtools flagstat, stating header cannot be found.
Looks like you forgot to include header when converting SAM to BAM using
samtools view
.I made the correction and received this:
[main_samview] fail to read the header from test1.sam file
So it looks like the error is coming from the mapping to output .SAM file command.
The correction of -h to the SAM to BAM file conversion states that their is also failure for reading header in .BAM file.
What can I do to rectify this?
What do you get when you try to look at header of one of the files?
Or is there no header at all?
There is no header at all
Are you sure the logic of your loop is sound? It looks like you are building a new reference (looping through files) and then trying to align the same fastq files to that index with iteration of the loop.
If you simply try
does it work properly? If it does then you need to debug your loop. Not sure why you are using
>>
if you are creating a new SAM files each time.I am going to debug and follow up
My files were in .fna.gz and that seemed to be the problem in producing SAM file with header.
Converted to .fna and works fine now.