GithubHelp home page GithubHelp logo

simroux / virsorter2_to_anvio Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 7 KB

Draft script to generate Anvi'o-compatible annotation files from VirSorter2 output, for visualization of VS2 results in Anvi'o

Python 100.00%

virsorter2_to_anvio's People

Contributors

simroux avatar

Watchers

 avatar  avatar  avatar

virsorter2_to_anvio's Issues

Issue running Virsorter2_to_anvio parser

I tried to run the Virsorter2_to_Anvio parser and I got this error. I'm not really sure if I did something wrong or if there's an issue with my Virsorter2 output that would have caused this? The virsorter_collection.txt and virsorter_additional_info.txt are still generated so there's just a problem with the annotations file.

VirSorter2_to_Anvio/virsorter_to_anvio.py -i phageomics/vs2-pass2-combined/ -s splits_basic_info_combined.txt -n all_gene_calls_combined.txt -d /hpc/refdata/virsorter/2.2.3/ -A virsorter_additional_info.txt -C virsorter_collection.txt -F virsorter_annotations.txt

######################## Reading all relevant VirSorter2 data
######################## Printing collection file and additional data file
Traceback (most recent call last):
File "/scratch/u/al59331/VirSorter2_to_Anvio/virsorter_to_anvio.py", line 254, in
nb_genes = info_contigs[split_parent][prophage]['nb_genes']
KeyError: 'nb_genes'

consistent error with conversion script

hello!
I’m trying to input my virsorter2 results into anvio and I’m having some issues with the conversion script.
Here’s the error I am getting:
./convert2anvio.sh ######################## Reading all relevant VirSorter2 data Traceback (most recent call last): File "/home/delaney/software/VirSorter2_to_Anvio/virsorter_to_anvio.py", line 148, in <module> with open(arg_dict['affi_file'], newline='') as csvfile: FileNotFoundError: [Errno 2] No such file or directory: '2014_4_10_Gb0149066_derep.fasta.output/for-dramv/viral-affi-contigs-for-dramv.tab' ... reading /home/delaney/db/virsorter2-db/group/lavidaviridae/hallmark-gene.list ... reading /home/delaney/db/virsorter2-db/group/NCLDV/hallmark-gene.list ... reading /home/delaney/db/virsorter2-db/group/RNA/hallmark-gene.list ... reading /home/delaney/db/virsorter2-db/group/ssDNA/hallmark-gene.list ... reading /home/delaney/db/virsorter2-db/group/dsDNAphage/hallmark-gene.list ######################## Reading all relevant VirSorter2 data Traceback (most recent call last): File "/home/delaney/software/VirSorter2_to_Anvio/virsorter_to_anvio.py", line 148, in <module> with open(arg_dict['affi_file'], newline='') as csvfile: FileNotFoundError: [Errno 2] No such file or directory: '2014_5_21_Gb0149067_derep.fasta.output/for-dramv/viral-affi-contigs-for-dramv.tab' ... reading /home/delaney/db/virsorter2-db/group/lavidaviridae/hallmark-gene.list ... reading /home/delaney/db/virsorter2-db/group/NCLDV/hallmark-gene.list ... reading /home/delaney/db/virsorter2-db/group/RNA/hallmark-gene.list ... reading /home/delaney/db/virsorter2-db/group/ssDNA/hallmark-gene.list ... reading /home/delaney/db/virsorter2-db/group/dsDNAphage/hallmark-gene.list ######################## Reading all relevant VirSorter2 data Traceback (most recent call last): File "/home/delaney/software/VirSorter2_to_Anvio/virsorter_to_anvio.py", line 148, in <module> with open(arg_dict['affi_file'], newline='') as csvfile: FileNotFoundError: [Errno 2] No such file or directory: '2014_7_17_Gb0149068_derep.fasta.output/for-dramv/viral-affi-contigs-for-dramv.tab' ... reading /home/delaney/db/virsorter2-db/group/lavidaviridae/hallmark-gene.list ... reading /home/delaney/db/virsorter2-db/group/NCLDV/hallmark-gene.list ... reading /home/delaney/db/virsorter2-db/group/RNA/hallmark-gene.list ... reading /home/delaney/db/virsorter2-db/group/ssDNA/hallmark-gene.list ... reading /home/delaney/db/virsorter2-db/group/dsDNAphage/hallmark-gene.list

and here is the script I am using
`#!/bin/bash -i

VS2_bysample="/home/delaney/5YV/JGI_assemblies/SH_QC_derep/31_VS2_results_by_sample"
ANVIO_INPUTS=$VS2_bysample/Anvio
mkdir -p $ANVIO_INPUTS

for dir in ls ${VS2_bysample}; do
org_name=$dir
BASENAME=$(basename $dir)
FILESTEM="${BASENAME%_derep.fasta.output}"
/home/delaney/software/VirSorter2_to_Anvio/virsorter_to_anvio.py -i ${dir} -s splits_basic_info.txt -n all_gene_calls.txt -d /home/db/virsorter-db_v2/ -A virsorter_additional_info.txt -C virsorter_collection.txt -F virsorter_annotations.txt
#echo $dir
#echo $FILESTEM

done
echo "done"`

directory is set up with a different file for each sample with the vs2 results in each as attached.

any help would be really appreciated!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.