Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort output fasta #55

Closed
erinyoung opened this issue Mar 21, 2024 · 0 comments
Closed

Sort output fasta #55

erinyoung opened this issue Mar 21, 2024 · 0 comments

Comments

@erinyoung
Copy link
Member

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 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant