Closed erinyoung closed 2 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 }
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 }