ngless-toolkit / ngless

NGLess: NGS with less work
https://ngless.embl.de
Other
142 stars 24 forks source link

orf_find(prots_out) usage? #97

Closed kubu4 closed 5 years ago

kubu4 commented 5 years ago

We're trying to use the orf_find(prots_out) argument, but keep getting errors. How do we use this?

Any insight would be greatly appreciated.

Here's what we've tried and the corresponding errors.


Script 1 (test.ngl2)

ngless "0.10"
input = fastq('/net/nunn/vol1/emmats/sequencing/geo_metaG/Library_Geoduck_MG_1_S3_L002_R1_001.fastq')
output = preprocess(input, keep_singles=False) using |read|:
read = substrim(read, min_quality=25)
if len(read) < 45:
discard

contigs = assemble(input)
write(contigs, ofile='contigs.fna')

orfs = orf_find(contigs, is_metagenome=True, prots_out=proteins.fna)
write(orfs, ofile='orf.fna')

Error:


"/net/nunn/vol1/emmats/sequencing/geo_metaG/test.ngl2" (line 11, column 6):
unexpected ("/net/nunn/vol1/emmats/sequencing/geo_metaG/test.ngl2" (line 11, column 6),TOperator '=')
expecting if (reserved word), discard (reserved word), continue (reserved word), variable, len (reserved word), operator -, not (reserved word), operator (, function call, operator [ or end of input

Script 2 (test.ngl2)

ngless "0.10"
input = fastq('/net/nunn/vol1/emmats/sequencing/geo_metaG/Library_Geoduck_MG_1_S3_L002_R1_001.fastq')
output = preprocess(input, keep_singles=False) using |read|:
read = substrim(read, min_quality=25)
if len(read) < 45:
discard

contigs = assemble(input)
write(contigs, ofile='contigs.fna')

orfs = orf_find(contigs, is_metagenome=True, prots_out='proteins.fna')
write(orfs, ofile='orf.fna')

Error:

Exiting after fatal error while loading and running script
Script Error
Error in type-checking (line 11): Bad argument type in function 'orf_find', variable "prots_out". Expected NGLFilename got NGLString.
luispedro commented 5 years ago

This was a bug in ngless. Sorry. I actually just fixed it a few hours ago

https://github.com/ngless-toolkit/ngless/commit/e8adcc2bb170bd44489e569e4d521c8ca9195958

There is also now a test for that, so it won't happen again in the future.