Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-u always active, unaligned reads cause parse error in samtools #47

Open
jmcasc opened this issue Jun 28, 2019 · 2 comments
Open

-u always active, unaligned reads cause parse error in samtools #47

jmcasc opened this issue Jun 28, 2019 · 2 comments

Comments

@jmcasc
Copy link

jmcasc commented Jun 28, 2019

At the moment, RapMap always prints unaligned reads, even if the -u flag is not given.
The writeUnmapped variable seems to be set according to the flag, but is later ignored.
Whenever such an unaligned read entry is read by samtools for sam->bam conversion, samtools terminates with a "parse error on line xxxxx".

Happens on current master branch and with current samtools version.

@mflevine
Copy link

Yea, writeUnmapped variable is never used or checked.

@shengxingou
Copy link

At the moment, RapMap always prints unaligned reads, even if the -u flag is not given. The writeUnmapped variable seems to be set according to the flag, but is later ignored. Whenever such an unaligned read entry is read by samtools for sam->bam conversion, samtools terminates with a "parse error on line xxxxx".

Happens on current master branch and with current samtools version.

I have encountered the same problem. I found that changing the eighth column * of the Sam file to 0 can solve this problem. But I don't know why that's the case.
"rapmap quasimap -i newest_ref_index -1 <(gunzip -c R1.fq.fastp.gz) -2 <(gunzip -c R2.fq.fastp.gz) -t 10 -u -o test.sam
cat test2.sam|awk '{if ($8 == "*") $8 = "0"; print}' OFS='\t'|samtools view -@ 10 -bS -f 12 > test.sam.f12.bam"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants