UPHL-BioNGS / Donut_Falls

Basic workflow for nanopore sequencing data
MIT License
14 stars 1 forks source link

Sort output fasta #55

Closed erinyoung closed 2 months ago

erinyoung commented 3 months ago

The following example shows how use a closure to collect and sort all sequences in a FASTA file from shortest to longest:

Channel .fromPath('/data/sequences.fa') .splitFasta( record: [id: true, sequence: true] ) .collectFile( name:'result.fa', sort: { it.size() } ) { it.sequence } .view { it.text }