ngless-toolkit / ngless

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

Update documentation for motus profiling to reflect motus2 #114

Open theavanrossum opened 5 years ago

theavanrossum commented 5 years ago

I noticed the documentation and template script for motus profiling seems to use motus v1 and a different, slightly more complicated approach than we're using in foundations/ngless-template-scripts

I would propose it be updated to reflect the new motus version and the simpler approach e.g. from ngless-template-scripts/motus-v2-keep-singles.ngl:

ngless "0.6"
import "motus" version "2.0"
import "parallel" version "0.6"
import "mocat" version "0.0"

num_marker_genes='3'
samples = readlines(ARGV[2])
sample = lock1(samples)
files = load_mocat_sample(ARGV[1] + '/' + sample)
files = preprocess(files, keep_singles=True) using |read|:
    read = substrim(read, min_quality=25)
    if len(read) < 45:
        discard

count = motus(files, sample=sample, n_marker_genes=num_marker_genes, relative_abundance=true)

collect(count,
        current=sample,
        allneeded=samples,
        ofile='outputs/all_samples.motusv2.relabund.tsv',
        auto_comments=[{date}, {hash}, {script}])

count_insert = motus(files, sample=sample, n_marker_genes=num_marker_genes)

collect(count_insert,
        current=sample,
        allneeded=samples,
        ofile='outputs/all_samples.motusv2.insertcount.tsv',
        auto_comments=[{date}, {hash}, {script}])

collect(qcstats({fastq}), ofile='preprocessing_fqstats.txt', current=sample, allneeded=samples)
theavanrossum commented 5 years ago

Could also be updated to motus2 in the ng-meta-profiler scripts?

unode commented 4 years ago

Given its age we should probably also consider deprecating motus 1.0 in favor of the newer versions (available through ngless-contrib).

unode commented 4 years ago

Could also be updated to motus2 in the ng-meta-profiler scripts?

There's now: https://github.com/ngless-toolkit/ng-meta-profiler/blob/master/extra/human-gut-profiler-motus-v2.ngl Currently as a separate script since the final outputs aren't compatible with those produced by the ngless 1.0 motus module.