asl / BandageNG

a Bioinformatics Application for Navigating De novo Assembly Graphs Easily
GNU General Public License v3.0
114 stars 10 forks source link

bandage image #133

Closed xhlin321 closed 1 year ago

xhlin321 commented 1 year ago

Thank you for continuing to maintain the bandage. I want to ask how to draw part of the graphics after the bandage blast through the command line instead of the gui, and how to add node parameters to the graphics,for example ,when i run " Bandage image sniffles.gfa 12.svg --query pigh.fa --scope aroundblast --distance 3 " the out file is all the blast result ,but i want get only one which is the best blast rensult like this

xhlin321 commented 1 year ago

77273674-E482-444E-B3DB-01CDF654CE3A

xhlin321 commented 1 year ago

0B60B18F-343C-4214-960D-CCC3B786D315

asl commented 1 year ago

Hello

There is no such functionality, because there is no way to define "best BLAST result". Likely you can narrow down your search via adding blast filters, so there will be less BLAST hits.

xhlin321 commented 1 year ago

Thanks for u advice!But how can I How can I implement blast filtering on the command line not the GUI

asl commented 1 year ago

--help contains the following section:

[Option Group: BLAST search]
  Options:
    --blastp TEXT               Parameters to be used by blastn and tblastn when conducting a BLAST search in Bandage-NG.
                                Format BLAST parameters exactly as they would be used for blastn/tblastn on the command line, and enclose them in quotes.
    --alfilter INT:INT in [1 - 1000000] [off]
                                Alignment length filter for BLAST hits. Hits with shorter alignments will be excluded
    --qcfilter FLOAT:FLOAT in [0 - 100] [off]
                                Query coverage filter for BLAST hits. Hits with less coverage will be excluded
    --ifilter FLOAT:FLOAT in [0 - 100] [off]
                                Identity filter for BLAST hits. Hits with less identity will be excluded
    --evfilter SCINOT:FLOAT in [1e-999 - 99] [off]
                                E-value filter for BLAST hits. Hits with larger e-values will be excluded
    --bsfilter FLOAT:FLOAT in [0 - 1e+06] [off]
                                Bit score filter for BLAST hits. Hits with lower bit scores will be excluded
[Option Group: BLAST query paths]
  These settings control how Bandage-NG searches for query paths after conducting a BLAST search
  Options:
    --pathnodes INT:INT in [1 - 50] [6]
                                The number of allowed nodes in a BLAST query path
    --minpatcov FLOAT:FLOAT in [0.3 - 1] [0.9]
                                Minimum fraction of a BLAST query which must be covered by a query path
    --minhitcov FLOAT:FLOAT in [0.3 - 1], or "off" [0.9]
                                Minimum fraction of a BLAST query which must be covered by BLAST hits in a query path
    --minmeanid FLOAT:FLOAT in [0 - 1], or "off" [0.5]
                                Minimum mean identity of BLAST hits in a query path
    --maxevprod SCINOT:FLOAT in [1e-999 - 99], or "off" [1e-10]
                                Maximum e-value product for all BLAST hits in a query path
    --minpatlen FLOAT:FLOAT in [0 - 10000], or "off" [0.95]
                                Minimum allowed relative path length as compared to the query
    --maxpatlen FLOAT:FLOAT in [0 - 10000], or "off" [1.05]
                                Maximum allowed relative path length as compared to the query
    --minlendis INT:INT in [-1000000 - 1000000], or "off" [off]
                                Minimum allowed length discrepancy (in bases) between a BLAST query and its path in the graph
    --maxlendis INT:INT in [-1000000 - 1000000], or "off" [off]
                                Maximum allowed length discrepancy (in bases) between a BLAST query and its path in the graph

Hope it will help

xhlin321 commented 1 year ago

Thank u very much for u answer! i run ' Bandage image sniffles.gfa 12.svg --query pb1.fa --scope aroundblast --distance 1 --bsfilter 500' ,then i got a svg like this , i wan to get the lenths in my picture ,what can i add some parameters in command line ' Bandage image sniffles.gfa 12.svg --query pb1.fa --scope aroundblast --distance 1 --bsfilter 500'(because my gui cannot work)

xhlin321 commented 1 year ago

269C2BEF-8366-4C9F-9E7F-BF952FF62441

xhlin321 commented 1 year ago

and this is what I want in the end 7D786970-68ED-4A35-8DD4-997E09BB1220

asl commented 1 year ago

Let us look into --help together again:

[Option Group: Node labels]
  Options:
    --csv TEXT:FILE             A CSV file with additional info
    --names                     Label nodes with name
    --lengths                   Label nodes with length
    --depth                     Label nodes with depth
    --blasthits                 Label BLAST hits
    --fontsize INT:INT in [1 - 100] [-1]
                                Font size for node labels
asl commented 1 year ago

Please reopen if there are still issues