TITLE: Preparing Data for vContact from Proteins (Cyverse)
AUTHORS: Benjamin Bolduc

[DESCRIPTION]
<div class = "text-blocks"><div class = "text-block"><span>Preparing data for use in vContact by using VirSorted </span><a href="https://github.com/MicroB3-IS/osd-analysis" style = "text-decoration:underline;color:blue;cursor:pointer;"><span style = ":;">Ocean Sampling Day (2014)</span></a><span> contigs, using tools available in </span><a href="https://www.protocols.io/view/cyverse.org" style = "text-decoration:underline;color:blue;cursor:pointer;"><span style = ":;">Cyverse</span></a><span>. This protocol creates a BLAST DB, BLASTs sequences, and creates a gene-to-contig mapping file. Results from this protocol are suitable for vContact-PCs.</span></div></div>

[STEPS]
?. [Generating Gene-to-Genome Mapping]
Open vContact2-Gene2GenomeAfter we have the prodigal proteins file renamed, we can open "vContact2-Gene2Genome" from the "Apps" menu.
?. [Generating Gene-to-Genome Mapping]
Select InputsUnder the 'Inputs' tab, select that renamed fileFor Proteins file:
?. [Generating Gene-to-Genome Mapping]
Select Parameters Under "Input source type" change to Prodigal amino acid proteins. Users can select a number of different parsing formats depending on the ORF caller they used to generate their proteins. For this example, everything passed through Prodigal, so we'll use Prodigal's formatting convention to extract the contigs each ORF/gene derives.Keep 'description' field with contig names: Some formats have descriptions in their fasta files. Flagging this option keeps those descriptions.Enable vContact1 headers: vContact1 and vContact2 fundamentally use the same input information, but are formatted a little differently. If you use vContact 1 you must select this box. Failure to do so will result in vContact 1, well, failing. If you are using vContact2, then keep this unchecked.Output filename: Anything useful or descriptive.
?. [Generating Gene-to-Genome Mapping]
Launch Analysis Run the job!This should take minutes. Depending on the queue in Cyverse, it will likely take longer to submit and start the job than it does to run it!
?. [Generating Gene-to-Genome Mapping]
ResultsFrom this point, it's off to vConTACT2! The gene2genome_proteins.csv file (in this example, "proteins.csv") and the original proteins file (used as input for this app) are the only hard requirements for vConTACT2.
?. [Preparing Files for Gene2Genome]
After VirSorter finishes, you'll want to combine the FASTA-formatted nucleotide files into a single file. This makes the next few steps easier.Open "Concatenate Multiple Files" from the "Apps" menu.
?. [Preparing Files for Gene2Genome]
Select the input data:Navigate to Community Data --> iVirus --> ExampleData --> iVirus_Ecogenomics_Pipeline. From the VirSorter/Output/Fasta_files, add "VIRSorter_cat-1.fasta" and "VIRSorter_cat-2.fasta". However, in this example, "VIRSorter_prophages_cat-4.fasta" and "VIRSorter_prophages_cat-5.fasta" are empty, meaning that VirSorter did not predict any prophage. That's normal for this data.
"High confidence" contigs usually derive from categories 1-2, 4-5. While it is possible some false positives are in categories 2 and 5, and some false negatives are in 3 and 6, it is generally believed that this is a fair compromise between balancing FPs with FNs. If you want to get 100% of all possible viruses potentially identified through VirSorter, you will need to manually inspect genomes in categories 3 and 6.
?. [Preparing Files for Gene2Genome]
Launch analysis!
?. [Preparing Files for Gene2Genome]
In the output directory, they'll be a single file, "concatenate_out.txt" and a "logs" directory.
?. [Preparing Files for Gene2Genome]
Since I don't like filenames that don't describe their content, we'll be renaming this to something more sensible.Select the "concatenate_out.txt" file, and then from the "Edit" menu, select "Rename"Rename it something that makes sense. For me, that'd be VirSorter_cat1245.fasta. That's because it represents VirSorter categories 1-2, 4-5 (even though 4-5 are empty). That should only take a second, and the result is
?. [Run Prodigal]
The next tool will be Prodigal. We're using Prodigal because the next app, vContact2-Gene2Genome, can take Prodigal output and convert it for use in vContact2.Open "Prodigal 2.6.3" from the "Apps" menu.
?. [Run Prodigal]
Under Inputs, select the concatenated file we just created.and under "Parameters", ensure that "Write Proteins" is selected and "Select procedure" is "Meta"
?. [Run Prodigal]
Launch analysis!
?. [Run Prodigal]
The output directory will contain the original file, and a prodigal output directory.
?. [Run Prodigal]
Rename that file to "VirSorter_cat1245.faa"