rrwick / Bandage

a Bioinformatics Application for Navigating De novo Assembly Graphs Easily
http://rrwick.github.io/Bandage/
GNU General Public License v3.0
579 stars 96 forks source link

feature request: add Scopes for 'length' and 'connectivity' #33

Open rec3141 opened 7 years ago

rec3141 commented 7 years ago

It would be useful to be able to filter by contig length, or by connections e.g. to avoid plotting singletons, or combined, to avoid plotting short singletons.

rec3141 commented 7 years ago

For others looking into this, you can do simple filtering outside of Bandage via perl. These work for FASTG files, but not GFA.

to output sequences >1000 bp/aa from a FASTG file: perl -0076 -ne 'chomp; unless ($.==1) {s/(.*)//; $name=$&; print ">$name$_" if tr/A-Z/A-Z/ > 1000}' assembly_graph.fastg

to print only non-singletons from a FASTG file: perl -0076 -ne 'chomp; unless ($.==1) {print ">$_" if (m/:/);}' assembly_graph.fastg

rrwick commented 7 years ago

That is a good idea - I'll add it to my (ever-growing) future feature list. Thanks!