simroux / VirSorter

Source code of the VirSorter tool, also available as an App on CyVerse/iVirus (https://de.iplantcollaborative.org/de/)
GNU General Public License v2.0
104 stars 30 forks source link

New anvi-export-gene-calls output kills virsorter_to_anvio.py #65

Open jarrodscott opened 4 years ago

jarrodscott commented 4 years ago

This iis not a bug with virsorter but I thought it might help to document this somewhere. So here I am.

The tool virsorter_to_anvio.py uses the output of anvi-export-gene-calls (among other files) to import virsorter annotation into anvio dbs (see post here). The script relies on the output columns to be in a particular order. That order has changed at some point in anvio's recent past.

It should be gene_callers_id contig start stop direction partial source version but is now gene_callers_id contig direction partial source start stop version aa_sequence,

so the columns need to be rearranged or the script changed. I wish I could offer I script fix :) but I just used awk.

awk 'BEGIN {FS="\t"; OFS="\t"} {print $1, $2, $6, $7, $3, $4, $5, $8}' all_gene_calls_TEMP.txt > all_gene_calls.txt

This rearranges and eliminates the aa_sequence column which as far as I can tell is not needed.

simroux commented 4 years ago

Thanks for the tip !