sorted BAM output

13 views
Skip to first unread message

ullo...@googlemail.com

unread,
Jan 21, 2021, 5:18:51 AM1/21/21
to NGLess
Dear all,
I would like to have a sorted bam from mapping to a custom reference. It seems that I'm using the wrong syntax. Could somebody please guide me? Using ngless v1.2 samtools module v 1.0
Best,
Ulrike

SARScov2_mapped = map(non_human_reads, fafile='allSARScov2variants210221.fna',allbest=true)

write(mapstats(SARScov2_mapped),ofile=RESULTS</> 'SARScov2.stats210221.txt')
counts = count(SARScov2_mapped,
            features=['seqname'],
            normalization={raw})

collect(counts,
        current=current,
        allneeded=samples,
        ofile='SARScov2.raw.210221.txt')
sorted = samtools_sort(SARScov2_mapped)
write(sorted, ofile=RESULTS<\> 'SARScov2.sorted.bam')
write(SARScov2_mapped, ofile=RESULTS<\> 'SARScov2.fastq.gz')

Exiting after fatal error while loading and running script
Script Error (there is likely an error in your script)
"human.ngl" (line 77, column 29):
unexpected '\\'
expecting "#", "//", "/*", "{", "'", "\"", digit, "0x", "_", letter, "!=", "==", "</>", "<=", "<", ">=", ">", "+", "*", " ", tab, ";", "\r", "\n" or end of input


Luis Pedro Coelho

unread,
Jan 21, 2021, 5:23:14 AM1/21/21
to ullo...@googlemail.com, NGLess
(I'm just reading on my phone, while on the subway, so could be wrong, but)

The operator is </>, inspired on Unix-like path separators.

Hth
Luis
--
Luis Pedro Coelho

ullo...@googlemail.com

unread,
Jan 21, 2021, 6:30:21 AM1/21/21
to NGLess
True, typo.
Thanks

Luis Pedro Coelho

unread,
Jan 22, 2021, 4:09:09 AM1/22/21
to NGLess List
I just committed a slight improvement so that you'd get a much better error message in the future:


HTH,
Luis

Luis Pedro Coelho | Fudan University | http://luispedro.org
--
You received this message because you are subscribed to the Google Groups "NGLess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngless+un...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages