├── .gitignore ├── COPYING.txt ├── INSTALL.md ├── LICENSE.txt ├── README.md ├── lombok.config ├── pom.xml ├── src ├── JVigor4.ucls ├── JVigor_UML.uml ├── assembly │ └── bin.xml ├── bin │ └── vigor4 ├── config │ └── vigor.ini ├── main │ ├── java │ │ └── org │ │ │ └── jcvi │ │ │ └── vigor │ │ │ ├── Application.java │ │ │ ├── Vigor.java │ │ │ ├── blast │ │ │ └── BlastVistorImpl.java │ │ │ ├── component │ │ │ ├── Alignment.java │ │ │ ├── AlignmentEvidence.java │ │ │ ├── AlignmentFragment.java │ │ │ ├── AlignmentTool.java │ │ │ ├── Exon.java │ │ │ ├── Exonerate.java │ │ │ ├── GeneAttributes.java │ │ │ ├── MaturePeptideMatch.java │ │ │ ├── Model.java │ │ │ ├── PartialProteinSequence.java │ │ │ ├── RNA_Editing.java │ │ │ ├── Ribosomal_Slippage.java │ │ │ ├── SpliceForm.java │ │ │ ├── SpliceSite.java │ │ │ ├── StartTranslationException.java │ │ │ ├── StopTranslationException.java │ │ │ ├── StructuralSpecifications.java │ │ │ ├── ViralProtein.java │ │ │ └── VirusGenome.java │ │ │ ├── exception │ │ │ ├── VigorException.java │ │ │ └── VigorRuntimeException.java │ │ │ ├── service │ │ │ ├── AdjustUneditedExonBoundaries.java │ │ │ ├── AdjustViralTricks.java │ │ │ ├── AlignmentGenerationService.java │ │ │ ├── AlignmentService.java │ │ │ ├── AlignmentToolFactory.java │ │ │ ├── CheckCoverage.java │ │ │ ├── CommandLineParameters.java │ │ │ ├── DetermineGeneFeatures.java │ │ │ ├── DetermineMissingExons.java │ │ │ ├── DetermineStart.java │ │ │ ├── DetermineStop.java │ │ │ ├── EvaluateModel.java │ │ │ ├── EvaluateScores.java │ │ │ ├── ExonerateService.java │ │ │ ├── GeneModelGenerationService.java │ │ │ ├── ModelGenerationService.java │ │ │ ├── PeptideMatchingService.java │ │ │ ├── PeptideService.java │ │ │ ├── Scores.java │ │ │ ├── VigorInitializationService.java │ │ │ ├── VigorInputValidationService.java │ │ │ ├── ViralProteinService.java │ │ │ ├── VirusGenomeService.java │ │ │ └── exception │ │ │ │ ├── ServiceException.java │ │ │ │ └── UserFacingException.java │ │ │ └── utils │ │ │ ├── AlignmentWriter.java │ │ │ ├── BaseOutputWriter.java │ │ │ ├── CDSWriter.java │ │ │ ├── ConfigurationParameterFunctions.java │ │ │ ├── ConfigurationParameters.java │ │ │ ├── ConfigurationUtils.java │ │ │ ├── FormatVigorOutput.java │ │ │ ├── GFF3Writer.java │ │ │ ├── GenerateExonerateOutput.java │ │ │ ├── IConfigurable.java │ │ │ ├── IDGenerator.java │ │ │ ├── IDSuffixGenerator.java │ │ │ ├── IOutputWriter.java │ │ │ ├── LoadDefaultParameters.java │ │ │ ├── NoteType.java │ │ │ ├── NullUtil.java │ │ │ ├── Outfiles.java │ │ │ ├── OutputContext.java │ │ │ ├── OutputWriterUtils.java │ │ │ ├── OutputWriters.java │ │ │ ├── PEPWriter.java │ │ │ ├── SUMWriter.java │ │ │ ├── SequenceUtils.java │ │ │ ├── TBLParser │ │ │ ├── TBLFileParser.java │ │ │ └── TBLModel.java │ │ │ ├── TBLWriter.java │ │ │ ├── VigorConfiguration.java │ │ │ ├── VigorFunctionalUtils.java │ │ │ ├── VigorLogging.java │ │ │ ├── VigorUtils.java │ │ │ └── WriterBundle.java │ └── resources │ │ ├── build.properties │ │ ├── log4j2.xml │ │ └── vigorResources │ │ └── config │ │ └── defaults.ini └── test │ ├── java │ └── org │ │ └── jcvi │ │ └── vigor │ │ ├── RegressionTest │ │ ├── GenerateReferenceModels.java │ │ ├── GenerateVigor4GeneModels.java │ │ ├── ValidateVigor4ModelsTest.java │ │ └── Vigor4RegressionTestRunner.java │ │ ├── service │ │ ├── AdjustUneditedExonBoundariesTest.java │ │ ├── AdjustViralTricksTest.java │ │ ├── AlignmentGenerationServiceTest.java │ │ ├── CheckCoverageTest.java │ │ ├── DetermineMissingExonsTest.java │ │ ├── DetermineStartAndStopTest.java │ │ ├── ModelGenerationServiceTest.java │ │ ├── PeptideServiceTest.java │ │ ├── TestRunner.java │ │ └── TestSuite.java │ │ ├── testing │ │ └── category │ │ │ ├── Dummy.java │ │ │ ├── Fast.java │ │ │ ├── Integration.java │ │ │ ├── Isolated.java │ │ │ ├── ReferenceDatabase.java │ │ │ ├── Regression.java │ │ │ └── Slow.java │ │ └── utils │ │ ├── SequenceUtilsTest.java │ │ ├── VigorConfigurationTest.java │ │ └── VigorTestUtils.java │ └── resources │ ├── config │ └── RegressionTestConfig.csv │ ├── flanOutput │ └── flua │ │ ├── flua.fasta │ │ └── flua.tbl │ ├── log4j2-test.xml │ ├── vigor4ReferenceOutput │ ├── flua │ │ ├── flua.aln │ │ ├── flua.cds │ │ ├── flua.gff3 │ │ ├── flua.pep │ │ ├── flua.tbl │ │ ├── flua.ungapped.fasta │ │ └── vigor-20181008-142517.ini │ ├── flub │ │ ├── flub.aln │ │ ├── flub.cds │ │ ├── flub.gff3 │ │ ├── flub.pep │ │ ├── flub.tbl │ │ ├── flub.ungapped.fasta │ │ └── vigor-20181008-142557.ini │ ├── fluc │ │ ├── fluc.aln │ │ ├── fluc.cds │ │ ├── fluc.gff3 │ │ ├── fluc.pep │ │ ├── fluc.tbl │ │ ├── fluc.ungapped.fasta │ │ └── vigor-20181008-235317.ini │ ├── rsv │ │ ├── rsv.aln │ │ ├── rsv.cds │ │ ├── rsv.gff3 │ │ ├── rsv.pep │ │ ├── rsv.tbl │ │ ├── rsv.ungapped.fasta │ │ └── vigor-20181008-125513.ini │ ├── rtva │ │ ├── rtva.aln │ │ ├── rtva.cds │ │ ├── rtva.gff3 │ │ ├── rtva.pep │ │ ├── rtva.tbl │ │ ├── rtva.ungapped.fasta │ │ └── vigor-20181008-131714.ini │ ├── rtvb │ │ ├── rtvb.aln │ │ ├── rtvb.cds │ │ ├── rtvb.gff3 │ │ ├── rtvb.pep │ │ ├── rtvb.tbl │ │ ├── rtvb.ungapped.fasta │ │ └── vigor-20181008-133203.ini │ ├── rtvc │ │ ├── rtvc.aln │ │ ├── rtvc.cds │ │ ├── rtvc.gff3 │ │ ├── rtvc.pep │ │ ├── rtvc.tbl │ │ ├── rtvc.ungapped.fasta │ │ └── vigor-20181008-133256.ini │ ├── rtvf │ │ ├── rtvf.aln │ │ ├── rtvf.cds │ │ ├── rtvf.gff3 │ │ ├── rtvf.pep │ │ ├── rtvf.tbl │ │ ├── rtvf.ungapped.fasta │ │ └── vigor-20181008-133340.ini │ ├── rtvg │ │ ├── rtvg.aln │ │ ├── rtvg.cds │ │ ├── rtvg.gff3 │ │ ├── rtvg.pep │ │ ├── rtvg.tbl │ │ ├── rtvg.ungapped.fasta │ │ └── vigor-20181008-133348.ini │ ├── sapo │ │ ├── sapo.aln │ │ ├── sapo.cds │ │ ├── sapo.gff3 │ │ ├── sapo.pep │ │ ├── sapo.tbl │ │ ├── sapo.ungapped.fasta │ │ └── vigor-20181008-133418.ini │ ├── veev │ │ ├── veev.aln │ │ ├── veev.cds │ │ ├── veev.gff3 │ │ ├── veev.pep │ │ ├── veev.tbl │ │ ├── veev.ungapped.fasta │ │ └── vigor-20181004-122424.ini │ ├── wnvI │ │ ├── vigor-20181008-140220.ini │ │ ├── wnvI.aln │ │ ├── wnvI.cds │ │ ├── wnvI.gff3 │ │ ├── wnvI.pep │ │ ├── wnvI.tbl │ │ └── wnvI.ungapped.fasta │ ├── wnvII │ │ ├── vigor-20181008-141233.ini │ │ ├── wnvII.aln │ │ ├── wnvII.cds │ │ ├── wnvII.gff3 │ │ ├── wnvII.pep │ │ ├── wnvII.tbl │ │ └── wnvII.ungapped.fasta │ └── zikv │ │ ├── vigor-20181008-142127.ini │ │ ├── zikv.aln │ │ ├── zikv.cds │ │ ├── zikv.gff3 │ │ ├── zikv.pep │ │ ├── zikv.tbl │ │ └── zikv.ungapped.fasta │ └── vigorUnitTestInput │ ├── Flua_RiboSlippage_Test.fasta │ ├── Flua_RiboSlippage_Test.txt │ ├── Flua_SpliceSites_Test.fasta │ ├── Flua_SpliceSites_Test.txt │ ├── Veev_StopTranslationEx_Test.fasta │ ├── Veev_StopTranslationEx_Test.txt │ ├── chikv.ungapped.fasta.JF274082.1.ref.fasta │ ├── chikv_ungapped.fasta.firsthalf │ ├── chikv_ungapped.fasta.secondhalf │ ├── exonerate_flua.txt │ ├── hadv_seqGaps.fasta │ ├── mmp_rna_editing_Test.fasta │ ├── mmp_rna_editing_Test.txt │ ├── sequence_flua-reverse.fasta │ ├── sequence_flua-reverse.txt │ ├── sequence_flua.fasta │ ├── sequence_flua.txt │ ├── sequence_flua_1.fasta │ ├── sequence_flua_alignmentTest.txt │ ├── sequence_spliceSites.fasta │ └── sequence_veev.fasta ├── vigor4-openjdk.docker └── vigor4-ubuntu.docker /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /logs/ 3 | /VigorWorkSpace/ 4 | .DS_Store 5 | .idea/ 6 | 7 | *.iml 8 | -------------------------------------------------------------------------------- /COPYING.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 - 2018 J. Craig Venter Institute. 2 | This file is part of JCVI VIGOR 3 | 4 | JCVI VIGOR is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | JCVI VIGOR is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with JCVI VIGOR. If not, see . 16 | 17 | Contributors: 18 | 19 | VIGOR3 20 | 21 | Shiliang Wang - Initial idea and implementation. 22 | Jeff Hoover - Redesigning, refactoring, and expanding the scope. 23 | Susmita Shrivastava and Neha Gupta - Creation and curation of sequence databases. 24 | Paolo Amedeo and Danny Katzel - Maintenance and further improvements. 25 | 26 | VIGOR4 27 | 28 | Swetha Nettem - Initial implementation, maintenance and futher improvements 29 | Paolo Amedeo - Overall architecting and design, curation of VIGOR4 compatible sequence databases, maintenance and futher improvements 30 | Indresh Singh - Planning and development guidance 31 | James Christensen - Maintenance and further improvements 32 | -------------------------------------------------------------------------------- /INSTALL.md: -------------------------------------------------------------------------------- 1 | # Building and Installing VIGOR4 2 | 3 | ## Build Dependencies 4 | 5 | ### Maven 6 | 7 | VIGOR4 uses Maven to build and package the program. Version 3.5 or 8 | later is recommended. 9 | 10 | ## Runtime Dependencies 11 | 12 | ### A Unix environment 13 | 14 | Although VIGOR4 may work on other operating systems, it has only been 15 | tested in a linux environment. 16 | 17 | ### Java 8 or above 18 | 19 | VIGOR4 uses features, such as lambda expressions and the `Stream` API, 20 | that are only available in Java 8 or above. 21 | 22 | ### Exonerate 23 | 24 | By default, VIGOR4 uses exonerate to generate its initial 25 | alignments. Exonerate is licensed under the GPL and is available from 26 | the European Bioinformatics Institute at 27 | [Exonerate](https://www.ebi.ac.uk/about/vertebrate-genomics/software/exonerate). 28 | VIGOR4 has been tested with the latest released exonerate version 29 | 2.2.0 and with the development version 2.4.0. 30 | 31 | Note: There is a bug in exonerate that is triggered by VIGOR when 32 | exonerate is compiled with assertions enabled. Add --disable-assert to 33 | configure options when building from source. 34 | 35 | ### Vigor Viral Database 36 | 37 | VIGOR4 requires the VIGOR viral database. It is distributed separately and is available at 38 | [VIGOR DB](https://github.com/JCVenterInstitute/VIGOR_DB) 39 | 40 | ## Building 41 | 42 | From the root folder where the `pom.xml` file is located, type the 43 | following on the commandline 44 | 45 | ``` 46 | %mvn clean package -DskipTests 47 | ``` 48 | 49 | This will create the zip file referenced in the Installing and 50 | Configuring section 51 | 52 | Running the tests during the build requires the path to the viral 53 | database be set. This can be done by setting the 54 | vigor4.reference_database_path system property on the commandlline 55 | 56 | ``` 57 | %mvn clean package -Dvigor4.reference_database_path=PATH_TO_DATABASE 58 | ``` 59 | 60 | 61 | ## Installing and Configuring 62 | 63 | Vigor is distributed as a zip file. Unzipping will create a directory 64 | structure with a root directory vigor-[VERSION], for example: 65 | 66 | ``` 67 | vigor-4.0.0/ 68 | vigor-4.0.0/bin 69 | vigor-4.0.0/config 70 | vigor-4.0.0/lib 71 | ``` 72 | 73 | The default location for the configuration file is config/vigor.ini 74 | and a skeleton configuration file is distributed with vigor4. The 75 | location to the configuration file may be passed on the command line 76 | using the `--config-file` option or set via the `VIGOR_CONFIG_FILE` 77 | environment variable. 78 | 79 | The minimum configuration requires setting the location of the 80 | exonerate binary, the path to the vigor viral database and the 81 | directory under which VIGOR4 can create temporary files and 82 | directories. An example might look like 83 | 84 | ``` 85 | reference_database_path=/data/VIGOR-DB/Reference_DBs/ 86 | exonerate_path=/usr/local/exonerate-2.2.0/bin/exonerate 87 | temporary_directory=/tmp/vigor-temp 88 | ``` 89 | 90 | For a full listing of the configuration parameters with a description, 91 | type the following on the commandline: 92 | 93 | ``` 94 | % VIGOR-4.0.0/bin/vigor4 --list-config-parameters 95 | ``` 96 | 97 | Configuration parameters may be set in a number of ways: 98 | 99 | - as environment variables 100 | - as java system properties passed via the JAVA_OPTS enviroment variable 101 | - on the commandline by using the -P or --parameter options 102 | - in the configuration file 103 | 104 | Where conflicting configuration parameters are set, values are resolved in the following order: 105 | 106 | - Parameters set via the command line 107 | - Parameters set via environment variables 108 | - Parameters set via system properties 109 | - Parameters set in the viral specific config file, if any 110 | - Parameters set in the general config file 111 | 112 | VIGOR4 will print a warning for any unrecognized configuration parameters. 113 | 114 | -------------------------------------------------------------------------------- /lombok.config: -------------------------------------------------------------------------------- 1 | config.stopBubbling = true 2 | lombok.addLombokGeneratedAnnotation = true -------------------------------------------------------------------------------- /src/JVigor_UML.uml: -------------------------------------------------------------------------------- 1 | 2 | 3 | JAVA 4 | 5 | 6 | com.vigor.component.Ribosomal_Slippage 7 | com.vigor.component.GeneModel 8 | com.vigor.component.StartTranslationException 9 | com.vigor.component.Exon 10 | com.vigor.component.GeneStructure 11 | com.vigor.component.Alignment 12 | com.vigor.component.RNA_Editing 13 | com.vigor.component.Pseudogene 14 | com.vigor.component.GeneAttributes 15 | com.vigor.component.Splicing 16 | com.vigor.component.VirusGenome 17 | com.vigor.component.Intron 18 | com.vigor.component.AlignmentFragment 19 | com.vigor.component.AlignmentEvidence 20 | com.vigor.component.StopTranslationException 21 | com.vigor.component.Model 22 | com.vigor.component.StructuralSpecifications 23 | com.vigor.component.ViralProtein 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | Fields 44 | Inner Classes 45 | 46 | All 47 | private 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/assembly/bin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | distribution 4 | 5 | zip 6 | 7 | 8 | 9 | 10 | src/bin 11 | bin 12 | unix 13 | 0755 14 | 15 | 16 | 17 | src/config 18 | 19 | vigor.ini 20 | 21 | config 22 | 23 | 24 | 25 | 26 | target 27 | lib 28 | 29 | vigor-*.jar 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/bin/vigor4: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | SOURCE="${BASH_SOURCE[0]}" 4 | # it's a symlink 5 | while [ -h "$SOURCE" ]; do 6 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" 7 | SOURCE="$(readlink "$SOURCE")" 8 | [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" 9 | done 10 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" 11 | 12 | function check_version() { 13 | java_cmd=$1 14 | version=$($java_cmd -version 2>&1| grep -o 'version ".*"') 15 | version=${version#*version*\"} 16 | version=${version%\"} 17 | IFS="." read major minor patch <<< "$version" 18 | if [[ ( "${major:-1}" -eq 1 && "${minor:-0}" -lt 8 ) || ( "${major:-1}" -gt 1 && "${major:-1}" -lt 8 ) ]]; then 19 | echo "Incompatible java version \"$version\" for java $java_cmd. Version must be 8 or higher." 20 | exit 1; 21 | fi 22 | } 23 | 24 | ROOTDIR=$(dirname "${DIR}") 25 | LIBDIR="${ROOTDIR}/lib" 26 | if [ -z ${VIGOR_CONFIG_FILE:-} ]; then 27 | export VIGOR_CONFIG_FILE="${ROOTDIR}/config/vigor.ini" 28 | fi 29 | 30 | java_command=$(command -v java) 31 | 32 | # JAVA_HOME will override path 33 | if [ -n "${JAVA_HOME:-}" ]; then 34 | java_command="$JAVA_HOME/bin/java" 35 | fi 36 | 37 | check_version $java_command 38 | 39 | exec $java_command ${JAVA_OPTS:-} -jar $(find "${LIBDIR}" -name '*.jar') "$@" 40 | -------------------------------------------------------------------------------- /src/config/vigor.ini: -------------------------------------------------------------------------------- 1 | # TODO add other potentially useful configuration examples 2 | 3 | # available at https://github.com/JCVenterInstitute/VIGOR_DB.git 4 | #reference_database_path=PATH/TO/REFERENCE/DATABASE 5 | 6 | # 7 | #exonerate_path=PATH/TO/EXONERATE 8 | 9 | #temporary_directory=PATH/TO/TEMPORARY DIRECTORY 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/Application.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor; 2 | 3 | import org.springframework.context.annotation.AnnotationConfigApplicationContext; 4 | import org.springframework.context.annotation.ComponentScan; 5 | 6 | @ComponentScan("org.jcvi.vigor") 7 | public class Application { 8 | 9 | public static void main ( String... args ) { 10 | 11 | try (AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(Application.class);) { 12 | ctx.getBean(Vigor.class).run(args); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/blast/BlastVistorImpl.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.blast; 2 | 3 | import java.util.LinkedList; 4 | import java.util.List; 5 | 6 | import org.jcvi.jillion.experimental.align.blast.BlastHit; 7 | import org.jcvi.jillion.experimental.align.blast.BlastVisitor; 8 | 9 | //Not part of current release 10 | public class BlastVistorImpl implements BlastVisitor { 11 | 12 | private String programName; 13 | private String programVersion; 14 | private String blastDb; 15 | private String queryId; 16 | private List blastHitList; 17 | 18 | @Override 19 | public void visitEnd () { 20 | 21 | System.out.println("***************** in visit End *******************"); 22 | } 23 | 24 | @Override 25 | public void visitInfo ( String programName, String programVersion, String blastDb, String queryId ) { 26 | 27 | System.out.println("***************** in visitInfo *******************"); 28 | System.out.println("programName: " + programName); 29 | System.out.println("programVersion: " + programVersion); 30 | System.out.println("blastDb: " + blastDb); 31 | System.out.println("queryId: " + queryId); 32 | System.out.println("***************** in visitInfo *******************"); 33 | this.programName = programName; 34 | this.programVersion = programVersion; 35 | this.blastDb = blastDb; 36 | this.queryId = queryId; 37 | } 38 | 39 | @Override 40 | public void visitHit ( BlastHit hit ) { 41 | 42 | System.out.println("***************** in visitHit *******************"); 43 | System.out.println(hit.getBlastDbName()); 44 | System.out.println(hit.getBlastProgramName()); 45 | System.out.println(hit.getQueryId()); 46 | System.out.println(hit.getSubjectDefinition()); 47 | System.out.println(hit.getSubjectId()); 48 | System.out.println(hit.getHsps()); 49 | System.out.println(hit.getQueryLength()); 50 | System.out.println(hit.getSubjectLength()); 51 | System.out.println("***************** in visitHit *******************"); 52 | if (blastHitList != null) { 53 | blastHitList.add(hit); 54 | } else { 55 | blastHitList = new LinkedList(); 56 | blastHitList.add(hit); 57 | } 58 | } 59 | 60 | public List getBlastHitList () { 61 | 62 | return blastHitList; 63 | } 64 | 65 | public void setBlastHitList ( List blastHitList ) { 66 | 67 | this.blastHitList = blastHitList; 68 | } 69 | 70 | public String getProgramName () { 71 | 72 | return programName; 73 | } 74 | 75 | public void setProgramName ( String programName ) { 76 | 77 | this.programName = programName; 78 | } 79 | 80 | public String getProgramVersion () { 81 | 82 | return programVersion; 83 | } 84 | 85 | public void setProgramVersion ( String programVersion ) { 86 | 87 | this.programVersion = programVersion; 88 | } 89 | 90 | public String getBlastDb () { 91 | 92 | return blastDb; 93 | } 94 | 95 | public void setBlastDb ( String blastDb ) { 96 | 97 | this.blastDb = blastDb; 98 | } 99 | 100 | public String getQueryId () { 101 | 102 | return queryId; 103 | } 104 | 105 | public void setQueryId ( String queryId ) { 106 | 107 | this.queryId = queryId; 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/Alignment.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import java.io.Serializable; 4 | import java.util.Collections; 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import org.jcvi.jillion.core.Direction; 9 | import org.springframework.context.annotation.Scope; 10 | import org.springframework.stereotype.Component; 11 | import lombok.Data; 12 | 13 | @Component 14 | @Scope("prototype") 15 | @Data 16 | @SuppressWarnings("serial") 17 | public class Alignment implements Serializable { 18 | 19 | private transient AlignmentTool alignmentTool; 20 | private List alignmentFragments = Collections.EMPTY_LIST; 21 | private Map alignmentScore = Collections.EMPTY_MAP; 22 | private transient VirusGenome virusGenome; 23 | private transient ViralProtein viralProtein; 24 | private transient AlignmentEvidence alignmentEvidence; 25 | 26 | // TODO fix this 27 | public Direction getDirection() { 28 | return alignmentFragments.stream() 29 | .anyMatch(af -> af.getDirection() == Direction.REVERSE) ? Direction.REVERSE : Direction.FORWARD; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/AlignmentEvidence.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import org.springframework.context.annotation.Scope; 4 | import org.springframework.stereotype.Component; 5 | import lombok.Data; 6 | 7 | import java.io.File; 8 | 9 | @Component 10 | @Scope("prototype") 11 | @Data 12 | public class AlignmentEvidence { 13 | 14 | private String reference_db; 15 | private String matpep_db; 16 | private File results_directory; 17 | private File raw_alignment; 18 | 19 | public AlignmentEvidence ( String ref_db ) { 20 | 21 | this.reference_db = ref_db; 22 | } 23 | 24 | public AlignmentEvidence ( String ref_db, String matpep_db, File results_directory, File raw_alignment ) { 25 | 26 | this.reference_db = ref_db; 27 | this.matpep_db = matpep_db; 28 | this.results_directory = results_directory; 29 | this.raw_alignment = raw_alignment; 30 | } 31 | 32 | public AlignmentEvidence () { 33 | 34 | } 35 | 36 | public AlignmentEvidence copy () { 37 | 38 | return new AlignmentEvidence(this.reference_db, this.matpep_db, results_directory, raw_alignment); 39 | } 40 | } 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/AlignmentFragment.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import org.jcvi.jillion.core.Direction; 4 | import org.jcvi.jillion.core.Range; 5 | import org.jcvi.jillion.core.residue.Frame; 6 | import org.jcvi.jillion.internal.core.util.JillionUtil; 7 | import org.springframework.context.annotation.Scope; 8 | import org.springframework.stereotype.Component; 9 | import lombok.Data; 10 | 11 | import java.util.Comparator; 12 | 13 | @Component 14 | @Scope("prototype") 15 | @Data 16 | public class AlignmentFragment implements Comparable, Cloneable { 17 | 18 | private final Direction direction; 19 | private final Range proteinSeqRange; 20 | private final Range nucleotideSeqRange; 21 | private final Frame frame; 22 | 23 | public AlignmentFragment ( Range proteinSeqRange, Range nucleotideRange, Direction direction, Frame frame ) { 24 | 25 | this.proteinSeqRange = proteinSeqRange; 26 | this.nucleotideSeqRange = nucleotideRange; 27 | this.direction = direction; 28 | this.frame = frame; 29 | } 30 | 31 | public int compareTo ( AlignmentFragment compareFragment ) { 32 | 33 | return Range.Comparators.ARRIVAL.compare(getNucleotideSeqRange(), 34 | compareFragment.getNucleotideSeqRange()); 35 | } 36 | 37 | public enum Comparators implements Comparator { 38 | Descending { 39 | @Override 40 | public int compare ( AlignmentFragment e1, AlignmentFragment e2 ) { 41 | 42 | return -1 * JillionUtil.compare(e1.getProteinSeqRange().getBegin(), e2.getProteinSeqRange().getBegin()); 43 | } 44 | }, 45 | Ascending { 46 | @Override 47 | public int compare ( AlignmentFragment e1, AlignmentFragment e2 ) { 48 | 49 | return JillionUtil.compare(e1.getProteinSeqRange().getBegin(), e2.getProteinSeqRange().getBegin()); 50 | } 51 | }; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/AlignmentTool.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import lombok.Data; 4 | import org.springframework.context.annotation.Scope; 5 | import org.springframework.stereotype.Component; 6 | 7 | @Component 8 | @Scope("prototype") 9 | @Data 10 | public abstract class AlignmentTool { 11 | 12 | public abstract String getToolName (); 13 | 14 | @Override 15 | public String toString () { 16 | 17 | return this.getToolName(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/Exon.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import java.util.Comparator; 4 | 5 | import org.jcvi.jillion.core.Range; 6 | import org.jcvi.jillion.core.residue.Frame; 7 | import org.jcvi.jillion.internal.core.util.JillionUtil; 8 | import org.springframework.context.annotation.Scope; 9 | import org.springframework.stereotype.Component; 10 | import lombok.Data; 11 | 12 | @Component 13 | @Scope("prototype") 14 | @Data 15 | public class Exon implements Cloneable { 16 | 17 | private Range range; 18 | private Frame frame; 19 | private AlignmentFragment alignmentFragment; 20 | private boolean is_5p_adjusted = false; 21 | private boolean is_3p_adjusted = false; 22 | private Frame sequenceFrame; 23 | 24 | public Exon () { 25 | 26 | } 27 | 28 | public Exon ( Range range, Frame frame ) { 29 | 30 | this.range = range; 31 | this.frame = frame; 32 | } 33 | 34 | public Exon clone () { 35 | 36 | Exon exon = null; 37 | try { 38 | exon = (Exon) ( super.clone() ); 39 | } catch (CloneNotSupportedException e) { 40 | // TODO Auto-generated catch block 41 | e.printStackTrace(); 42 | } 43 | return exon; 44 | } 45 | 46 | public enum Comparators implements Comparator { 47 | Descending { 48 | @Override 49 | public int compare ( Exon e1, Exon e2 ) { 50 | 51 | return -1 * JillionUtil.compare(e1.getRange().getBegin(), e2.getRange().getBegin()); 52 | } 53 | }, 54 | Ascending { 55 | @Override 56 | public int compare ( Exon e1, Exon e2 ) { 57 | 58 | return JillionUtil.compare(e1.getRange().getBegin(), e2.getRange().getBegin()); 59 | } 60 | }; 61 | } 62 | @Override 63 | public String toString(){ 64 | String frame = getFrame()==null ? "" : " frame:"+getFrame(); 65 | return " "+range.toString()+frame; 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/Exonerate.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import lombok.Data; 4 | import org.springframework.context.annotation.Scope; 5 | import org.springframework.stereotype.Component; 6 | 7 | @Component 8 | @Scope("prototype") 9 | @Data 10 | public class Exonerate extends AlignmentTool { 11 | 12 | private String name; 13 | 14 | public Exonerate ( String name ) { 15 | 16 | this.name = name; 17 | } 18 | 19 | @Override 20 | public String getToolName () { 21 | 22 | return this.name; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/GeneAttributes.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import org.springframework.context.annotation.Scope; 4 | import org.springframework.stereotype.Component; 5 | import lombok.Data; 6 | 7 | import java.util.Collections; 8 | import java.util.List; 9 | 10 | @Component 11 | @Scope("prototype") 12 | @Data 13 | public class GeneAttributes { 14 | 15 | private Ribosomal_Slippage ribosomal_slippage = Ribosomal_Slippage.NO_SLIPPAGE; 16 | private List spliceForms = Collections.EMPTY_LIST; 17 | private StartTranslationException startTranslationException = StartTranslationException.NO_EXCEPTION; 18 | private StopTranslationException stopTranslationException = StopTranslationException.NO_EXCEPTION; 19 | private RNA_Editing rna_editing = RNA_Editing.NO_EDITING; 20 | private StructuralSpecifications structuralSpecifications = new StructuralSpecifications(); 21 | private List spliceSites = Collections.EMPTY_LIST; 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/MaturePeptideMatch.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import lombok.Data; 4 | import org.jcvi.jillion.core.Range; 5 | import org.jcvi.jillion.core.residue.aa.ProteinSequence; 6 | import org.springframework.context.annotation.Scope; 7 | import org.springframework.stereotype.Component; 8 | 9 | @Component 10 | @Scope("prototype") 11 | @Data 12 | @SuppressWarnings("serial") 13 | public class MaturePeptideMatch { 14 | /** 15 | * Protein from model 16 | */ 17 | private ProteinSequence protein; 18 | 19 | /** 20 | * Reference peptide 21 | */ 22 | private ViralProtein reference; 23 | 24 | /** 25 | * position of alignment of reference to protein starting from beginning of protein. 26 | */ 27 | private Range proteinRange; 28 | 29 | /** 30 | * position of alignment of reference to protein starting from beginning of reference. 31 | */ 32 | private Range referenceRange; 33 | 34 | /** 35 | * gaps, truncations at beginning of alignment or misalignment to previous peptide 36 | */ 37 | private boolean fuzzyBegin= false; 38 | /** 39 | * gaps, truncations at end of alignment or misalignment to next peptide 40 | */ 41 | private boolean fuzzyEnd = false; 42 | 43 | private double identity; 44 | private double coverage; 45 | private double similarity; 46 | 47 | public static MaturePeptideMatch of(ProteinSequence protein, ViralProtein reference, Range proteinRange, Range referenceRange) { 48 | return of(protein, reference, proteinRange, referenceRange, false, false, 0, 0, 0); 49 | } 50 | 51 | public static MaturePeptideMatch of(ProteinSequence protein, ViralProtein reference, Range proteinRange, Range referenceRange, boolean fuzzyBegin, boolean fuzzyEnd, double identity, double similarity, double coverage) { 52 | MaturePeptideMatch mpMatch = new MaturePeptideMatch(); 53 | mpMatch.setProtein(protein); 54 | mpMatch.setReference(reference); 55 | mpMatch.setProteinRange(proteinRange); 56 | mpMatch.setReferenceRange(referenceRange); 57 | mpMatch.setFuzzyBegin(fuzzyBegin); 58 | mpMatch.setFuzzyEnd(fuzzyEnd); 59 | mpMatch.setIdentity(identity); 60 | mpMatch.setSimilarity(similarity); 61 | mpMatch.setCoverage(coverage); 62 | return mpMatch; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/Model.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import java.util.*; 4 | import java.util.stream.Collectors; 5 | 6 | import com.google.common.base.MoreObjects; 7 | import org.jcvi.jillion.core.Direction; 8 | import org.jcvi.jillion.core.Range; 9 | import org.jcvi.jillion.core.residue.aa.ProteinSequence; 10 | import org.jcvi.vigor.utils.NoteType; 11 | import org.springframework.context.annotation.Scope; 12 | import org.springframework.stereotype.Component; 13 | import lombok.Data; 14 | 15 | @Component 16 | @Scope("prototype") 17 | @Data 18 | public class Model implements Cloneable { 19 | 20 | private List exons = new ArrayList<>(); 21 | private Alignment alignment; 22 | private Map scores = new HashMap<>(); 23 | private String geneSymbol; 24 | private List status = new ArrayList<>(); 25 | private Direction direction; 26 | private boolean partial5p = false; 27 | private boolean partial3p = false; 28 | private boolean isPseudogene = false; 29 | private Range replaceStopCodonRange; 30 | private Range ribosomalSlippageRange; 31 | private Range insertRNAEditingRange; 32 | private ProteinSequence translatedSeq; 33 | private String geneID; 34 | private List notes = new ArrayList<>(); 35 | private List maturePeptides = new ArrayList<>(); 36 | 37 | public Model clone () throws CloneNotSupportedException { 38 | 39 | Model model = (Model) super.clone(); 40 | model.setExons(this.getExons().stream().map(Exon::clone).collect(Collectors.toList())); 41 | model.setScores(new HashMap<>(this.scores)); 42 | model.setStatus(new ArrayList<>(this.status)); 43 | model.setNotes(new ArrayList<>(this.notes)); 44 | return model; 45 | } 46 | 47 | /** 48 | * Get the nucleotide range from the beginning of the first exon to the end of the last exon 49 | * 50 | * @return 51 | */ 52 | public Range getRange () { 53 | 54 | List exons = getExons(); 55 | if (!exons.isEmpty()) { 56 | long start = exons.get(0).getRange().getBegin(); 57 | long end = exons.get(exons.size() - 1).getRange().getEnd(); 58 | return Range.of(Math.min(start, end), Math.max(start, end)); 59 | } 60 | return Range.ofLength(0); 61 | } 62 | 63 | public String getProteinID() { 64 | return getAlignment().getViralProtein().getProteinID(); 65 | } 66 | 67 | @Override 68 | public String toString() { 69 | return MoreObjects.toStringHelper(this) 70 | .omitNullValues() 71 | .add("ID", hashCode()) 72 | .add("Gene", geneSymbol) 73 | .add("protein", getProteinID()) 74 | .add("exons", exons.stream().map(Object::toString).collect(Collectors.joining(","))) 75 | .toString(); 76 | } 77 | 78 | public void addNote(NoteType note) { 79 | getNotes().add(note.toString()); 80 | } 81 | 82 | public void addNote(String note) { 83 | getNotes().add(note); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/PartialProteinSequence.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | 4 | import org.jcvi.jillion.core.residue.aa.ProteinSequence; 5 | 6 | public class PartialProteinSequence { 7 | 8 | final boolean partial3p; 9 | final boolean partial5p; 10 | final ProteinSequence sequence; 11 | final String proteinID; 12 | 13 | private PartialProteinSequence(String proteinID, ProteinSequence sequence, boolean partial3p, boolean partial5p) { 14 | this.proteinID = proteinID; 15 | this.sequence = sequence; 16 | this.partial3p = partial3p; 17 | this.partial5p = partial5p; 18 | } 19 | 20 | public static PartialProteinSequence of (String proteinID, ProteinSequence sequence, boolean partial3p, boolean partial5p) { 21 | return new PartialProteinSequence(proteinID, sequence, partial3p, partial5p); 22 | } 23 | 24 | public boolean isPartial3p() { 25 | return partial3p; 26 | } 27 | 28 | public boolean isPartial5p() { 29 | return partial5p; 30 | } 31 | 32 | public ProteinSequence getSequence() { 33 | return sequence; 34 | } 35 | 36 | public String getProteinID() { 37 | return proteinID; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/RNA_Editing.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import lombok.Data; 4 | import org.apache.logging.log4j.LogManager; 5 | import org.apache.logging.log4j.Logger; 6 | import org.jcvi.vigor.utils.VigorUtils; 7 | import org.springframework.context.annotation.Scope; 8 | import org.springframework.stereotype.Component; 9 | 10 | /** 11 | * Created by snettem on 5/8/2017. 12 | */ 13 | @Component 14 | @Scope("prototype") 15 | @Data 16 | public class RNA_Editing { 17 | 18 | private static Logger LOGGER = LogManager.getLogger(RNA_Editing.class); 19 | private final boolean has_RNA_editing; 20 | private final int offset; 21 | private final String regExp; 22 | private final String insertionString; 23 | private final String note; 24 | 25 | public RNA_Editing ( boolean has_editing, int offset, String regExp, String insertionString, String note ) { 26 | 27 | this.has_RNA_editing = has_editing; 28 | this.offset = offset; 29 | this.regExp = regExp; 30 | this.insertionString = insertionString; 31 | this.note = note; 32 | } 33 | 34 | /** 35 | * 36 | * @param rnaEditingString 37 | * @return 38 | * @throws IllegalArgumentException 39 | * 40 | */ 41 | public static RNA_Editing parseFromString(String rnaEditingString) throws IllegalArgumentException { 42 | String[] temp = rnaEditingString.split("/"); 43 | if (temp.length !=4) { 44 | throw new IllegalArgumentException( 45 | String.format("Bad format for rna editing \"%s\". Format is [OFFSET]/INSERTION/MOTIF/NOTE", rnaEditingString) 46 | ); 47 | } 48 | int rna_editing_offset = 0; 49 | String rnaOffsetString = temp[0].trim(); 50 | if (! VigorUtils.is_Integer(rnaOffsetString)) { 51 | rna_editing_offset = Integer.parseInt(temp[0]); 52 | } else if (! rnaEditingString.isEmpty()) { 53 | LOGGER.warn("Bad offset value {} for RNA editing. Full string {}", rnaOffsetString, rnaEditingString); 54 | } 55 | return new RNA_Editing(true, rna_editing_offset, temp[2], temp[1], temp[3]); 56 | } 57 | 58 | public static final RNA_Editing NO_EDITING = new RNA_Editing(false, 0, "", "", ""); 59 | } -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/Ribosomal_Slippage.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import lombok.Data; 4 | import org.springframework.context.annotation.Scope; 5 | import org.springframework.stereotype.Component; 6 | 7 | /** 8 | * Created by snettem on 5/8/2017. 9 | */ 10 | @Component 11 | @Scope("prototype") 12 | @Data 13 | public class Ribosomal_Slippage { 14 | 15 | private final boolean has_ribosomal_slippage; 16 | private final String slippage_motif; 17 | private final int slippage_offset; 18 | private final int slippage_frameshift; 19 | 20 | public Ribosomal_Slippage ( boolean has_slippage, String motif, int offset, int frameshift ) { 21 | 22 | this.has_ribosomal_slippage = has_slippage; 23 | this.slippage_motif = motif; 24 | this.slippage_offset = offset; 25 | this.slippage_frameshift = frameshift; 26 | } 27 | 28 | public static Ribosomal_Slippage parseFromString(String slippageString) throws IllegalArgumentException { 29 | String[] temp = slippageString.split("/"); 30 | if (temp.length == 3) { 31 | return new Ribosomal_Slippage(true, temp[2], Integer.parseInt(temp[0]), Integer.parseInt(temp[1])); 32 | } 33 | throw new IllegalArgumentException( 34 | String.format("Invalid ribsomal slippage format\"%s\". Format is OFFSET/FRAMESHIFT/MOTIF_REGEX", slippageString) 35 | ); 36 | } 37 | 38 | public final static Ribosomal_Slippage NO_SLIPPAGE = new Ribosomal_Slippage(false, "", 0, 0); 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/SpliceForm.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import org.jcvi.vigor.exception.VigorRuntimeException; 4 | 5 | import java.util.ArrayList; 6 | import java.util.Collections; 7 | import java.util.List; 8 | import java.util.regex.Matcher; 9 | import java.util.regex.Pattern; 10 | import java.util.stream.Collectors; 11 | 12 | public class SpliceForm { 13 | public enum SpliceType {EXON, INTRON} 14 | 15 | public final SpliceType type; 16 | public final long length; 17 | 18 | public SpliceForm(SpliceType type, long length) { 19 | this.type = type; 20 | this.length = length; 21 | } 22 | 23 | private final static Pattern spliceFormPattern = Pattern.compile("(?[ie]-?\\d+)"); 24 | 25 | public static SpliceForm fromString(String spliceForm) { 26 | spliceForm = spliceForm.toLowerCase(); 27 | return new SpliceForm(spliceForm.charAt(0) == 'e' ? SpliceType.EXON : SpliceType.INTRON, 28 | Long.parseLong(spliceForm.substring(1))); 29 | } 30 | 31 | public String toString() { 32 | return (type == SpliceType.EXON ? "e" : "i") + Long.toString(this.length); 33 | } 34 | 35 | public static String spliceFormsToString(List spliceForms) { 36 | return String.join("", spliceForms.stream().map(SpliceForm::toString).collect(Collectors.toList())); 37 | } 38 | 39 | public static List parseFromString(String spliceForm) { 40 | if (spliceForm == null || spliceForm.isEmpty()) { 41 | return Collections.emptyList(); 42 | } 43 | Matcher matcher = spliceFormPattern.matcher(spliceForm); 44 | List spliceForms = new ArrayList<>(); 45 | int end = 0; 46 | while (matcher.find()) { 47 | if (matcher.start() != end) { 48 | throw new VigorRuntimeException(String.format("malformed splice_form: %s problem substring %s", 49 | spliceForm, 50 | spliceForm.substring(end, matcher.start()))); 51 | } 52 | String spec = matcher.group("spec"); 53 | end = matcher.end(); 54 | spliceForms.add(fromString(spec)); 55 | } 56 | return spliceForms; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/SpliceSite.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import com.google.common.collect.ImmutableList; 4 | 5 | import java.util.List; 6 | 7 | public class SpliceSite { 8 | 9 | public static final List DEFAULT_SPLICE_SITES = ImmutableList.of(new SpliceSite("GT", "AG")); 10 | 11 | public final String donor; 12 | public final String acceptor; 13 | 14 | public SpliceSite(String donor, String acceptor ) { 15 | 16 | this.donor = donor; 17 | this.acceptor = acceptor; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/StartTranslationException.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import lombok.Data; 4 | import org.springframework.context.annotation.Scope; 5 | import org.springframework.stereotype.Component; 6 | 7 | import java.util.Collections; 8 | import java.util.List; 9 | 10 | /** 11 | * Created by snettem on 5/8/2017. 12 | */ 13 | @Component 14 | @Scope("prototype") 15 | @Data 16 | public class StartTranslationException { 17 | 18 | private final boolean hasStartTranslationException; 19 | private final List alternateStartCodons; 20 | 21 | public StartTranslationException ( boolean hasStartTranslationException, List alternateStartCodons ) { 22 | 23 | this.hasStartTranslationException = hasStartTranslationException; 24 | this.alternateStartCodons = alternateStartCodons; 25 | } 26 | 27 | public static StartTranslationException NO_EXCEPTION = new StartTranslationException(false, Collections.EMPTY_LIST); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/StopTranslationException.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import lombok.Data; 4 | import org.jcvi.jillion.core.residue.aa.AminoAcid; 5 | import org.springframework.context.annotation.Scope; 6 | import org.springframework.stereotype.Component; 7 | 8 | /** 9 | * Created by snettem on 5/8/2017. 10 | */ 11 | @Component 12 | @Scope("prototype") 13 | @Data 14 | public class StopTranslationException { 15 | 16 | private final boolean hasStopTranslationException; 17 | private final AminoAcid replacementAA; 18 | private final String motif; 19 | private final int offset; 20 | 21 | public StopTranslationException ( boolean hasStopTranslationException, AminoAcid replacementAA, String motif, int offset ) { 22 | 23 | this.hasStopTranslationException = hasStopTranslationException; 24 | this.replacementAA = replacementAA; 25 | this.motif = motif; 26 | this.offset = offset; 27 | } 28 | 29 | public static StopTranslationException NO_EXCEPTION = new StopTranslationException(false, AminoAcid.Unknown_Amino_Acid, "", 0); 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/StructuralSpecifications.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import lombok.Data; 4 | import org.springframework.context.annotation.Scope; 5 | import org.springframework.stereotype.Component; 6 | 7 | import java.util.Collections; 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | /** 12 | * Created by snettem on 5/9/2017. 13 | */ 14 | @Component 15 | @Scope("prototype") 16 | @Data 17 | public class StructuralSpecifications implements Cloneable { 18 | 19 | private List shared_cds = Collections.EMPTY_LIST; 20 | private boolean is_required; 21 | private List excludes_gene = Collections.EMPTY_LIST; 22 | private Map tiny_exon3 = Collections.EMPTY_MAP; 23 | private Map tiny_exon5 = Collections.EMPTY_MAP; 24 | private int minFunctionalLength; 25 | 26 | protected Object clone () throws CloneNotSupportedException { 27 | 28 | return super.clone(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/ViralProtein.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import org.jcvi.jillion.core.residue.aa.ProteinSequence; 4 | import org.jcvi.vigor.utils.VigorConfiguration; 5 | import org.springframework.context.annotation.Scope; 6 | import org.springframework.stereotype.Component; 7 | 8 | import java.util.List; 9 | 10 | import org.jcvi.jillion.core.Range; 11 | import lombok.Data; 12 | 13 | @Component 14 | @Scope("prototype") 15 | @Data 16 | public class ViralProtein { 17 | 18 | private List NTfragments; 19 | private List introns; 20 | private ProteinSequence sequence; 21 | private GeneAttributes geneAttributes = new GeneAttributes(); 22 | private String proteinID; 23 | private String geneSymbol; 24 | private String geneSynonym; 25 | private String defline; 26 | private String product; 27 | private VigorConfiguration configuration; 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/component/VirusGenome.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.component; 2 | 3 | import org.jcvi.jillion.core.Range; 4 | import org.jcvi.jillion.core.residue.Frame; 5 | import org.jcvi.jillion.core.residue.nt.NucleotideSequence; 6 | import org.springframework.context.annotation.Scope; 7 | import org.springframework.stereotype.Component; 8 | import lombok.Data; 9 | 10 | import java.util.*; 11 | import java.util.stream.Collectors; 12 | 13 | @Component 14 | @Scope("prototype") 15 | @Data 16 | public class VirusGenome { 17 | 18 | // sequence, defline and id :-> single object from jillion 19 | private NucleotideSequence sequence; 20 | private String defline; 21 | private String id; 22 | private Boolean isCircular = false; 23 | private List sequenceGaps = Collections.EMPTY_LIST; 24 | private Map> internalStops = Collections.EMPTY_MAP; 25 | 26 | public VirusGenome ( NucleotideSequence sequence, String defline, String id, boolean isCircular ) { 27 | 28 | this.sequence = sequence; 29 | this.defline = defline; 30 | this.id = id; 31 | this.isCircular = isCircular; 32 | } 33 | 34 | public VirusGenome () { 35 | 36 | } 37 | 38 | public VirusGenome(VirusGenome copyFrom) { 39 | this(copyFrom.getSequence(), copyFrom.getDefline(), copyFrom.getId(), copyFrom.getIsCircular()); 40 | setSequenceGaps(new ArrayList<>(copyFrom.getSequenceGaps())); 41 | setInternalStops(copyFrom.getInternalStops() 42 | .entrySet() 43 | .stream() 44 | .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))); 45 | } 46 | } -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/exception/VigorException.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.exception; 2 | 3 | public class VigorException extends Exception { 4 | 5 | private static final long serialVersionUID = -8729709786417672433L; 6 | 7 | public VigorException ( String msg ) { 8 | 9 | super(msg); 10 | } 11 | 12 | public VigorException ( Throwable nestedException ) { 13 | 14 | super(nestedException); 15 | } 16 | 17 | public VigorException ( String message, Throwable nestedException ) { 18 | 19 | super(message, nestedException); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/exception/VigorRuntimeException.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.exception; 2 | 3 | public class VigorRuntimeException extends RuntimeException { 4 | 5 | public VigorRuntimeException() { 6 | } 7 | 8 | public VigorRuntimeException(String message) { 9 | super(message); 10 | } 11 | 12 | public VigorRuntimeException(String message, Throwable cause) { 13 | super(message, cause); 14 | } 15 | 16 | public VigorRuntimeException(Throwable cause) { 17 | super(cause); 18 | } 19 | 20 | public VigorRuntimeException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { 21 | super(message, cause, enableSuppression, writableStackTrace); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/service/AlignmentGenerationService.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service; 2 | 3 | import org.jcvi.vigor.component.*; 4 | import org.jcvi.vigor.exception.VigorException; 5 | import org.jcvi.vigor.service.exception.ServiceException; 6 | import org.jcvi.vigor.utils.ConfigurationParameters; 7 | import org.jcvi.vigor.utils.FormatVigorOutput; 8 | 9 | import java.io.IOException; 10 | import java.nio.file.Files; 11 | import java.nio.file.Path; 12 | import java.nio.file.Paths; 13 | import java.util.List; 14 | 15 | import org.apache.logging.log4j.LogManager; 16 | import org.apache.logging.log4j.Logger; 17 | import org.jcvi.vigor.utils.VigorConfiguration; 18 | import org.jcvi.vigor.utils.VigorUtils; 19 | import org.springframework.beans.factory.annotation.Autowired; 20 | import org.springframework.stereotype.Service; 21 | 22 | /** 23 | * Created by snettem on 5/9/2017. 24 | */ 25 | @Service 26 | public class AlignmentGenerationService { 27 | 28 | private static final Logger LOGGER = LogManager.getLogger(AlignmentGenerationService.class); 29 | @Autowired 30 | private ViralProteinService viralProteinService; 31 | @Autowired 32 | private ExonerateService exonerateService; 33 | 34 | public List generateAlignment ( VirusGenome virusGenome, String referenceDB, VigorConfiguration config ) throws VigorException { 35 | boolean isDebug = config.getOrDefault(ConfigurationParameters.Verbose, false); 36 | String alignmentModule = config.get(ConfigurationParameters.AlignmentModule); 37 | AlignmentTool alignmentTool = AlignmentToolFactory.getAlignmentTool(alignmentModule); 38 | String tempDir = config.get(ConfigurationParameters.TemporaryDirectory); 39 | AlignmentService alignmentService = getAlignmentService(alignmentTool); 40 | Path workspace; 41 | try { 42 | workspace = Files.createTempDirectory(Paths.get(tempDir), "vigor4"); 43 | Runtime.getRuntime().addShutdownHook(new Thread(() -> VigorUtils.deleteDirectory(workspace))); 44 | } catch (IOException e) { 45 | throw new VigorException(String.format("Unable to create temporary directory under %s", tempDir)); 46 | } 47 | List alignments = alignmentService.getAlignment(config, virusGenome, referenceDB, workspace.toString()); 48 | for (int i = 0; i < alignments.size(); i++) { 49 | alignments.set(i, viralProteinService.setViralProteinAttributes(alignments.get(i), config)); 50 | } 51 | if (isDebug) { 52 | FormatVigorOutput.printAlignments(alignments); 53 | } 54 | return alignments; 55 | } 56 | 57 | /** 58 | * @param alignmentTool 59 | * @return AlignmentService with alignment algorithm 60 | * @throws ServiceException 61 | */ 62 | private AlignmentService getAlignmentService ( AlignmentTool alignmentTool) throws ServiceException { 63 | 64 | if (alignmentTool != null && "exonerate".equals(alignmentTool.getToolName())) { 65 | return exonerateService; 66 | } 67 | throw new ServiceException(String.format("Unsupported alignment tool %s", alignmentTool)); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/service/AlignmentService.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service; 2 | 3 | import org.jcvi.vigor.component.Alignment; 4 | import org.jcvi.vigor.component.AlignmentTool; 5 | import org.jcvi.vigor.component.VirusGenome; 6 | import org.jcvi.vigor.service.exception.ServiceException; 7 | import org.jcvi.vigor.utils.VigorConfiguration; 8 | 9 | import java.util.List; 10 | 11 | public interface AlignmentService { 12 | 13 | List getAlignment (VigorConfiguration config, VirusGenome virusGenome, String referenceDB, String workspace ) throws ServiceException; 14 | AlignmentTool getAlignmentTool(); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/service/AlignmentToolFactory.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service; 2 | 3 | import org.jcvi.vigor.component.AlignmentTool; 4 | import org.jcvi.vigor.component.Exonerate; 5 | 6 | public class AlignmentToolFactory { 7 | 8 | public static AlignmentTool getAlignmentTool ( String alignmentModule ) { 9 | 10 | if (alignmentModule.equalsIgnoreCase("exonerate")) { 11 | return new Exonerate("exonerate"); 12 | } 13 | return null; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/service/CommandLineParameters.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service; 2 | 3 | public final class CommandLineParameters { 4 | 5 | public final static String outputPrefix = "output_prefix"; 6 | public final static String inputFile = "input_fasta"; 7 | public final static String referenceDB = "reference_database"; 8 | public final static String minCoverage = "min_coverage"; 9 | public final static String circularGenome = "circular_genome"; 10 | public final static String frameshiftSensitivity = "frameshift_sensitivity"; 11 | public final static String locusTag = "locus_tag"; 12 | public final static String ignoreReferenceRequirements = "ignore_reference_requirements"; 13 | public final static String parameters = "parameters"; 14 | public final static String verbose = "verbose"; 15 | public final static String ignoreRefID = "ignore_refID"; 16 | public final static String configFile = "config_file"; 17 | public final static String referenceDB_Path = "reference_database_path"; 18 | public final static String overwriteOutputFiles = "overwrite_output_files"; 19 | public final static String virusSpecificConfig = "virusSpecificConfig"; 20 | public final static String virusSpecificConfigPath = "virusSpecificConfigPath"; 21 | public final static String temporaryDirectory = "temporaryDirectory"; 22 | public final static String listDatabases = "listDatabases"; 23 | 24 | /** 25 | * Not to be instantiated 26 | */ 27 | private CommandLineParameters () { 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/service/DetermineGeneFeatures.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service; 2 | 3 | import java.util.List; 4 | 5 | import org.jcvi.vigor.component.Model; 6 | import org.jcvi.vigor.service.exception.ServiceException; 7 | 8 | public interface DetermineGeneFeatures { 9 | 10 | List determine (Model model) throws ServiceException; 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/service/EvaluateModel.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service; 2 | 3 | import org.jcvi.vigor.component.Model; 4 | import org.jcvi.vigor.utils.VigorConfiguration; 5 | 6 | public interface EvaluateModel { 7 | 8 | Model evaluate (Model model, VigorConfiguration configuration ); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/service/EvaluateScores.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service; 2 | 3 | import java.util.Map; 4 | 5 | import org.apache.logging.log4j.LogManager; 6 | import org.apache.logging.log4j.Logger; 7 | import org.jcvi.vigor.component.Model; 8 | import org.jcvi.vigor.utils.ConfigurationParameters; 9 | import org.jcvi.vigor.utils.VigorConfiguration; 10 | import org.springframework.stereotype.Service; 11 | 12 | @Service 13 | public class EvaluateScores implements EvaluateModel { 14 | 15 | private static final Logger LOGGER = LogManager.getLogger(EvaluateScores.class); 16 | 17 | @Override 18 | public Model evaluate ( Model model, VigorConfiguration defaultConfiguration ) { 19 | 20 | Map scores = model.getScores(); 21 | VigorConfiguration configuration = model.getAlignment().getViralProtein().getConfiguration(); 22 | double alignmentScoreFactor = configuration.getOrDefault(ConfigurationParameters.ScoreFactorAlignment, 1d); 23 | 24 | double startScoreFactor = configuration.getOrDefault(ConfigurationParameters.ScoreFactorStart, 1d); 25 | double splicingScoreFactor = configuration.getOrDefault(ConfigurationParameters.ScoreFactorSplicing, 1d); 26 | double stopScoreFactor = configuration.getOrDefault(ConfigurationParameters.ScoreFactorStop, 1d); 27 | double leakyStopScoreFactor = configuration.getOrDefault(ConfigurationParameters.ScoreFactorLeakyStop, 1d); 28 | 29 | double alignmentScore = scores.getOrDefault(Scores.ALIGNMENT_SCORE,0d) * alignmentScoreFactor; 30 | double startCodonScore = scores.getOrDefault(Scores.START_CODON_SCORE,0d) * startScoreFactor;; 31 | double splicingScore = scores.getOrDefault(Scores.SPLICE_SCORE,0d) * splicingScoreFactor; 32 | double leakyStopScore = scores.getOrDefault(Scores.LEAKY_STOP_SCORE,0d) * leakyStopScoreFactor; 33 | double stopScore = scores.getOrDefault(Scores.STOP_CODON_SCORE,0d) * stopScoreFactor;; 34 | double totalScore; 35 | scores.put(Scores.ALIGNMENT_SCORE, alignmentScore); 36 | scores.put(Scores.START_CODON_SCORE, startCodonScore); 37 | scores.put(Scores.LEAKY_STOP_SCORE, leakyStopScore); 38 | scores.put(Scores.SPLICE_SCORE, splicingScore); 39 | scores.put(Scores.STOP_CODON_SCORE, stopScore); 40 | totalScore = alignmentScore + startCodonScore + leakyStopScore + splicingScore + stopScore; 41 | scores.put(Scores.TOTAL_SCORE, totalScore); 42 | 43 | LOGGER.debug("Calculated scores for model {} : Alignment: {}, Start Codon: {}, Leaky Stop: {}, Splicing: {}. Stop: {}, Total: {} ", 44 | model, alignmentScore, startCodonScore, leakyStopScore, splicingScore, stopScore, totalScore); 45 | 46 | return model; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/service/PeptideMatchingService.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service; 2 | 3 | import org.jcvi.vigor.component.MaturePeptideMatch; 4 | import org.jcvi.vigor.component.Model; 5 | import org.jcvi.vigor.service.exception.ServiceException; 6 | 7 | import java.io.File; 8 | import java.util.List; 9 | 10 | /** 11 | * TODO add filter argument 12 | */ 13 | public interface PeptideMatchingService { 14 | 15 | class Scores { 16 | final double identity; 17 | final double coverage; 18 | final double similarity; 19 | 20 | Scores(double identity, double coverage, double similarity) { 21 | this.identity = identity; 22 | this.coverage = coverage; 23 | this.similarity = similarity; 24 | } 25 | 26 | public static Scores of(double identity, double coverage, double similarity) { 27 | return new Scores(identity, coverage, similarity); 28 | } 29 | 30 | } 31 | 32 | List findPeptides(Model model, File peptideDatabase, Scores scores) throws ServiceException; 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/service/Scores.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service; 2 | 3 | /** 4 | * Static score names to avoid typos 5 | */ 6 | public class Scores { 7 | public static final String ALIGNMENT_SCORE = "alignmentScore"; 8 | public static final String START_CODON_SCORE = "startCodonScore"; 9 | public static final String LEAKY_STOP_SCORE = "leakyStopScore"; 10 | public static final String STOP_CODON_SCORE = "stopCodonScore"; 11 | public static final String SPLICE_SCORE = "spliceScore"; 12 | public static final String TOTAL_SCORE = "totalScore"; 13 | public static final String MODEL_SCORE = "modelScore"; 14 | public static final String IDENTITY_SCORE = "%identity"; 15 | public static final String SIMILARITY_SCORE = "%similarity"; 16 | public static final String COVERAGE_SCORE = "%coverage"; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/service/VirusGenomeService.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | import java.util.Map; 6 | import java.util.stream.Collectors; 7 | 8 | import org.jcvi.jillion.core.Range; 9 | import org.jcvi.jillion.core.residue.Frame; 10 | import org.jcvi.jillion.core.residue.aa.IupacTranslationTables; 11 | import org.jcvi.jillion.core.residue.nt.NucleotideSequence; 12 | import org.jcvi.jillion.fasta.nt.NucleotideFastaRecord; 13 | import org.jcvi.vigor.component.VirusGenome; 14 | import org.jcvi.vigor.utils.ConfigurationParameters; 15 | import org.jcvi.vigor.utils.VigorConfiguration; 16 | import org.jcvi.vigor.utils.VigorFunctionalUtils; 17 | import org.springframework.stereotype.Service; 18 | 19 | @Service 20 | public class VirusGenomeService { 21 | 22 | /** 23 | * @param sequence 24 | * @return List: Only ranges having length greater or equal to 25 | * min_gap_length will be considered as a sequence gap 26 | */ 27 | public static List findSequenceGapRanges ( Integer minGapLength, NucleotideSequence sequence ) { 28 | 29 | List rangesOfNs = sequence.getRangesOfNs() 30 | .stream() 31 | .filter(x->x.getLength()>=minGapLength) 32 | .collect(Collectors.toList()); 33 | List filteredRangesOfNs = new ArrayList(); 34 | if (!rangesOfNs.isEmpty()) { 35 | Range previousRange = rangesOfNs.get(0); 36 | filteredRangesOfNs.add(previousRange); 37 | for (int i = 1; i < rangesOfNs.size(); i++) { 38 | Range currentRange = rangesOfNs.get(i); 39 | // TODO remove magic value 6 40 | if (Range.of(previousRange.getEnd(),currentRange.getBegin()).getLength()<=6) { 41 | filteredRangesOfNs.set(filteredRangesOfNs.size() -1 , Range.of(previousRange.getBegin(), currentRange.getEnd())); 42 | }else{ 43 | filteredRangesOfNs.add(currentRange); 44 | } 45 | previousRange=filteredRangesOfNs.get(filteredRangesOfNs.size()-1); 46 | } 47 | } 48 | return filteredRangesOfNs; 49 | } 50 | 51 | /** 52 | * 53 | * @param NTSequence 54 | * @return 55 | */ 56 | public static Map> findInternalStops ( NucleotideSequence NTSequence ) { 57 | 58 | Map> stops = IupacTranslationTables.STANDARD.findStops(NTSequence); 59 | stops = VigorFunctionalUtils.frameToSequenceFrame(stops); 60 | return stops; 61 | } 62 | 63 | /** 64 | * 65 | * @param record 66 | * @param config 67 | * @return 68 | */ 69 | public static VirusGenome fastaRecordToVirusGenome( NucleotideFastaRecord record, VigorConfiguration config) { 70 | VirusGenome virusGenome = new VirusGenome(record.getSequence(), record.getComment(), record.getId(), 71 | config.getOrDefault(ConfigurationParameters.CircularGene, false)); 72 | Integer min_gap_length = config.get(ConfigurationParameters.SequenceGapMinimumLength); 73 | virusGenome.setInternalStops(findInternalStops(virusGenome.getSequence())); 74 | virusGenome.setSequenceGaps(findSequenceGapRanges(min_gap_length,virusGenome.getSequence())); 75 | return virusGenome; 76 | } 77 | 78 | /** 79 | * 80 | * @param inputGenome 81 | * @param config 82 | * @return reverse complement input sequence and create virusGenome object 83 | */ 84 | public static VirusGenome reverseComplementVirusGenome(VirusGenome inputGenome,VigorConfiguration config){ 85 | NucleotideSequence reverseCompGenome = inputGenome.getSequence().toBuilder().reverseComplement().build(); 86 | VirusGenome virusGenome = new VirusGenome(reverseCompGenome, 87 | inputGenome.getDefline(), 88 | inputGenome.getId(), 89 | inputGenome.getIsCircular()); 90 | Integer min_gap_length = config.get(ConfigurationParameters.SequenceGapMinimumLength); 91 | virusGenome.setInternalStops(findInternalStops(virusGenome.getSequence())); 92 | virusGenome.setSequenceGaps(findSequenceGapRanges(min_gap_length,virusGenome.getSequence())); 93 | return virusGenome; 94 | } 95 | 96 | } 97 | 98 | 99 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/service/exception/ServiceException.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service.exception; 2 | 3 | import org.jcvi.vigor.exception.VigorException; 4 | 5 | public class ServiceException extends VigorException { 6 | 7 | public ServiceException ( String message ) { 8 | 9 | super(message); 10 | } 11 | 12 | public ServiceException ( String message, Throwable cause ) { 13 | 14 | super(message, cause); 15 | } 16 | 17 | public ServiceException ( Throwable cause ) { 18 | 19 | super(cause); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/service/exception/UserFacingException.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service.exception; 2 | 3 | import org.jcvi.vigor.exception.VigorException; 4 | 5 | public class UserFacingException extends VigorException { 6 | 7 | public UserFacingException(String msg) { 8 | super(msg); 9 | } 10 | 11 | public UserFacingException(Throwable nestedException) { 12 | super(nestedException); 13 | } 14 | 15 | public UserFacingException(String message, Throwable nestedException) { 16 | super(message, nestedException); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/AlignmentWriter.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | import org.apache.logging.log4j.LogManager; 4 | import org.apache.logging.log4j.Logger; 5 | import org.jcvi.vigor.component.Model; 6 | import org.jcvi.vigor.exception.VigorException; 7 | 8 | import java.io.File; 9 | import java.io.FileInputStream; 10 | import java.io.IOException; 11 | import java.util.List; 12 | import java.util.stream.Collectors; 13 | 14 | public class AlignmentWriter extends BaseOutputWriter { 15 | private static Logger LOGGER = LogManager.getLogger(AlignmentWriter.class); 16 | 17 | @Override 18 | public void writeModels(Outfiles outfiles, List models) throws VigorException, IOException { 19 | if (models.isEmpty()) { 20 | LOGGER.warn("No models to print to ALN file"); 21 | } 22 | 23 | OutputContext context = new OutputContext(); 24 | context.addContext(OutputContext.Key.GENOME, models.get(0).getGeneID()); 25 | 26 | try (WriterBundle bw = getWriter(outfiles, context, OutputContext.Key.GENOME)) { 27 | List raw_files = models.stream() 28 | .map(m -> m.getAlignment().getAlignmentEvidence().getRaw_alignment()) 29 | .distinct() 30 | .collect(Collectors.toList()); 31 | 32 | for (File raw_alignment : raw_files) { 33 | printAlignment(bw, raw_alignment); 34 | } 35 | } 36 | List temp_directories = models.stream() 37 | .map(m -> m.getAlignment().getAlignmentEvidence().getResults_directory()) 38 | .distinct() 39 | .collect(Collectors.toList()); 40 | for (File temp_directory: temp_directories) { 41 | VigorUtils.deleteTempFiles(temp_directory.getAbsolutePath()); 42 | } 43 | } 44 | 45 | @Override 46 | public String getExtension() { 47 | return "aln"; 48 | } 49 | 50 | // TODO don't write alignments one character at a time. 51 | public void printAlignment (WriterBundle bw, File inputFile ) { 52 | 53 | try { 54 | FileInputStream fRead = new FileInputStream(inputFile); 55 | int c; 56 | while (( c = fRead.read() ) != -1) { 57 | bw.write((char) c); 58 | } 59 | fRead.close(); 60 | } catch (Exception e) { 61 | LOGGER.warn("Error reading temporory alignment file {}", inputFile.getAbsolutePath()); 62 | } 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/BaseOutputWriter.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | import org.apache.logging.log4j.LogManager; 4 | import org.apache.logging.log4j.Logger; 5 | import org.jcvi.vigor.exception.VigorException; 6 | 7 | import java.io.BufferedWriter; 8 | import java.io.IOException; 9 | import java.nio.file.Path; 10 | import java.nio.file.Paths; 11 | import java.util.*; 12 | import java.util.function.Consumer; 13 | 14 | public abstract class BaseOutputWriter implements IOutputWriter, IConfigurable { 15 | 16 | private static Logger LOGGER = LogManager.getLogger(BaseOutputWriter.class); 17 | private static Consumer nullHandler = (b) -> {}; 18 | 19 | protected boolean multiFile = false; 20 | 21 | public void configure(VigorConfiguration config) { 22 | multiFile = config.getOrDefault(ConfigurationParameters.MultiFile, false); 23 | } 24 | 25 | public Consumer getOnOpen() { 26 | return nullHandler; 27 | } 28 | 29 | public Consumer getOnClose() { 30 | return nullHandler; 31 | } 32 | 33 | public WriterBundle getWriter(Outfiles outfiles, 34 | OutputContext context, 35 | OutputContext.Key ... toClose ) 36 | throws IOException, VigorException 37 | { 38 | List writers = new ArrayList<>(); 39 | List borrowedBuffers = new ArrayList<>(); 40 | Path baseFilePath = outfiles.getBaseFilePath(getExtension()); 41 | writers.add(outfiles.getWriter(baseFilePath, getOnOpen(), getOnClose())); 42 | borrowedBuffers.addAll(writers); 43 | 44 | if (multiFile) { 45 | EnumSet closeSet = toClose.length == 0 ? EnumSet.noneOf(OutputContext.Key.class): EnumSet.copyOf(Arrays.asList(toClose)); 46 | BufferedWriter bw; 47 | for (OutputContext.Key key : context.keySet()) { 48 | if (!context.getContext(key).isPresent()) { 49 | LOGGER.warn("No context value provided for key {}", key); 50 | continue; 51 | } 52 | String value = context.getContext(key).get(); 53 | switch (key) { 54 | case GENOME: 55 | String sequenceFile = OutputWriterUtils.getSequenceFilePath(value) + "." + getExtension(); 56 | bw = outfiles.getWriter(Paths.get(sequenceFile), getOnOpen(), getOnClose()); 57 | break; 58 | case GENE: 59 | case PEP: 60 | String geneFilePath = OutputWriterUtils.getGeneFilePath(value) + "." + getExtension(); 61 | bw = outfiles.getWriter(Paths.get(geneFilePath), getOnOpen(), getOnClose()); 62 | break; 63 | default: 64 | throw new VigorException("Unexpected context key " + key.toString()); 65 | } 66 | writers.add(bw); 67 | if (!closeSet.contains(key)) { 68 | borrowedBuffers.add(bw); 69 | } 70 | } 71 | } 72 | WriterBundle bundle = new WriterBundle(writers.toArray(new BufferedWriter[]{})); 73 | for (BufferedWriter writer: borrowedBuffers) { 74 | bundle.borrowed(writer); 75 | } 76 | return bundle; 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/CDSWriter.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | import org.apache.logging.log4j.LogManager; 4 | import org.apache.logging.log4j.Logger; 5 | import org.jcvi.jillion.core.Range; 6 | import org.jcvi.jillion.core.residue.nt.NucleotideSequence; 7 | import org.jcvi.jillion.core.residue.nt.NucleotideSequenceBuilder; 8 | import org.jcvi.vigor.component.Model; 9 | import org.jcvi.vigor.exception.VigorException; 10 | 11 | import java.io.IOException; 12 | import java.util.Collections; 13 | import java.util.List; 14 | import java.util.stream.Collectors; 15 | 16 | import static org.jcvi.vigor.utils.OutputWriterUtils.getDefline; 17 | 18 | public class CDSWriter extends BaseOutputWriter { 19 | 20 | private static Logger LOGGER = LogManager.getLogger(CDSWriter.class); 21 | 22 | @Override 23 | public String getExtension() { 24 | return "cds"; 25 | } 26 | 27 | @Override 28 | public void writeModels(Outfiles outfiles, List geneModels) throws IOException, VigorException { 29 | if (geneModels.isEmpty()) { 30 | LOGGER.warn("No gene models to write CDS reports"); 31 | return; 32 | } 33 | OutputContext context = new OutputContext(); 34 | context.addContext(OutputContext.Key.GENOME, geneModels.get(0).getGeneID()); 35 | try (WriterBundle unused = getWriter(outfiles, context, OutputContext.Key.GENOME)) { 36 | for (Model model : geneModels) { 37 | context.addContext(OutputContext.Key.GENE, model.getGeneID()); 38 | try (WriterBundle bw = getWriter(outfiles, context, OutputContext.Key.GENE)) { 39 | bw.write(getDefline(model)); 40 | bw.newLine(); 41 | NucleotideSequenceBuilder builder = new NucleotideSequenceBuilder(); 42 | NucleotideSequence virusGenome = model.getAlignment().getVirusGenome().getSequence(); 43 | long seqLength = virusGenome.getLength(); 44 | List translatedRanges = model.getExons() 45 | .stream() 46 | .map(e -> VigorFunctionalUtils.getDirectionBasedRange(e.getRange(), 47 | seqLength, 48 | model.getDirection())) 49 | .collect(Collectors.toList()); 50 | Collections.sort(translatedRanges, Range.Comparators.ARRIVAL); 51 | for (Range exonRange : translatedRanges) { 52 | builder.append(virusGenome.toBuilder(exonRange).build()); 53 | } 54 | 55 | OutputWriterUtils.writeSequence(bw, builder.build()); 56 | } 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/IConfigurable.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | public interface IConfigurable { 4 | 5 | public void configure(VigorConfiguration config); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/IDGenerator.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | import java.util.Iterator; 4 | import java.util.concurrent.atomic.AtomicInteger; 5 | 6 | public class IDGenerator implements Iterable, Iterator { 7 | 8 | private final String seed; 9 | private AtomicInteger counter = new AtomicInteger(0); 10 | 11 | public IDGenerator ( String seed ) { 12 | 13 | this.seed = seed; 14 | } 15 | 16 | @Override 17 | public Iterator iterator () { 18 | 19 | return this; 20 | } 21 | 22 | @Override 23 | public boolean hasNext () { 24 | 25 | return true; 26 | } 27 | 28 | @Override 29 | public String next () { 30 | 31 | return seed + "." + counter.incrementAndGet(); 32 | } 33 | 34 | public static IDGenerator of ( String seed ) { 35 | 36 | return new IDGenerator(seed); 37 | } 38 | 39 | public String getCurrent() { 40 | return seed + "." + counter.get(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/IDSuffixGenerator.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | import java.util.Arrays; 4 | import java.util.Iterator; 5 | 6 | public class IDSuffixGenerator implements Iterable, Iterator { 7 | 8 | private static final int start = (int) 'a'; 9 | private static final int end = (int) 'z'; 10 | 11 | private int[] current; 12 | public IDSuffixGenerator() { 13 | current = new int[] {}; 14 | } 15 | 16 | @Override 17 | public Iterator iterator() { 18 | return this; 19 | } 20 | 21 | @Override 22 | public boolean hasNext() { 23 | return true; 24 | } 25 | 26 | @Override 27 | public String next() { 28 | increment(); 29 | return currentValue(); 30 | } 31 | 32 | private void increment() { 33 | int val; 34 | 35 | boolean rollover = true; 36 | for (int i=current.length -1 ; i>= 0; i--) { 37 | val = current[i]; 38 | if (rollover) { 39 | val += 1; 40 | current[i] = val; 41 | } 42 | rollover = false; 43 | if (val > end ) { 44 | val = start; 45 | current[i] = val; 46 | rollover = true; 47 | } 48 | } 49 | if (rollover) { 50 | current = Arrays.copyOf(current, current.length + 1); 51 | current[current.length -1 ] = start; 52 | } 53 | } 54 | 55 | private String currentValue() { 56 | StringBuffer value = new StringBuffer(); 57 | for (int val: current) { 58 | value.append( (char) val); 59 | } 60 | return value.toString(); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/IOutputWriter.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | import org.jcvi.vigor.component.Model; 4 | import org.jcvi.vigor.exception.VigorException; 5 | 6 | import java.io.IOException; 7 | import java.util.List; 8 | 9 | public interface IOutputWriter { 10 | 11 | void writeModels(Outfiles outfiles, List models) throws VigorException, IOException; 12 | String getExtension(); 13 | WriterBundle getWriter(Outfiles outfiles, 14 | OutputContext context, 15 | OutputContext.Key ... toClose ) throws IOException, VigorException; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/LoadDefaultParameters.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | import java.io.File; 4 | import java.net.URL; 5 | import java.util.*; 6 | import java.util.function.Function; 7 | 8 | import org.apache.commons.configuration2.INIConfiguration; 9 | import org.apache.commons.configuration2.builder.fluent.Configurations; 10 | import org.apache.commons.configuration2.ex.ConfigurationException; 11 | import org.apache.logging.log4j.LogManager; 12 | import org.apache.logging.log4j.Logger; 13 | import org.jcvi.vigor.exception.VigorException; 14 | import org.jcvi.vigor.service.VigorInitializationService; 15 | 16 | public class LoadDefaultParameters { 17 | 18 | private static final Logger LOGGER = LogManager.getLogger(VigorInitializationService.class); 19 | 20 | @SuppressWarnings("Duplicates") 21 | public static VigorConfiguration loadVigorConfiguration ( String sourceName, File path, Function> flagFunction ) throws VigorException { 22 | 23 | try { 24 | Configurations configs = new Configurations(); 25 | INIConfiguration iniConfig = configs.ini(path); 26 | return loadVigorConfiguration(sourceName, iniConfig, flagFunction); 27 | } catch (ConfigurationException e) { 28 | LOGGER.error(e.getMessage(), e); 29 | throw new VigorException(String.format("unable to load configuration file %s", path), e); 30 | } 31 | } 32 | 33 | @SuppressWarnings("Duplicates") 34 | public static VigorConfiguration loadVigorConfiguration (String sourceName, URL path, Function> flagFunction) 35 | throws VigorException { 36 | 37 | try { 38 | Configurations configs = new Configurations(); 39 | INIConfiguration iniConfig = configs.ini(path); 40 | return loadVigorConfiguration(sourceName, iniConfig, flagFunction); 41 | } catch (ConfigurationException e) { 42 | LOGGER.error(e.getMessage(), e); 43 | throw new VigorException(String.format("unable to load configuration file %s", path), e); 44 | } 45 | } 46 | 47 | public static Map> configFileToSectionMap(URL path) throws VigorException { 48 | Configurations configs = new Configurations(); 49 | try { 50 | INIConfiguration iniConfig = configs.ini(path); 51 | return iniFileToSectionMap(iniConfig); 52 | } catch (ConfigurationException e) { 53 | LOGGER.error(e.getMessage(), e); 54 | throw new VigorException(String.format("unable to load configuration file %s", path), e); 55 | } 56 | } 57 | 58 | public static Map> configFileToSectionMap(File path) throws VigorException { 59 | Configurations configs = new Configurations(); 60 | try { 61 | INIConfiguration iniConfig = configs.ini(path); 62 | return iniFileToSectionMap(iniConfig); 63 | } catch (ConfigurationException e) { 64 | LOGGER.error(e.getMessage(), e); 65 | throw new VigorException(String.format("unable to load configuration file %s", path), e); 66 | } 67 | } 68 | 69 | public static Map> iniFileToSectionMap(INIConfiguration iniConfig) { 70 | final Map> parametersMap = new HashMap<>(); 71 | Map sectionMap; 72 | String key; 73 | String val; 74 | String configSection; 75 | for (String sectionName: iniConfig.getSections()) { 76 | configSection = sectionName == null || sectionName.isEmpty() ? VigorConfiguration.DEFAULT_SECTION : sectionName; 77 | sectionMap = parametersMap.computeIfAbsent(configSection, k -> new HashMap<>()); 78 | Iterator keyIter = iniConfig.getSection(sectionName).getKeys(); 79 | while (keyIter.hasNext()) { 80 | key = keyIter.next(); 81 | val = iniConfig.getSection(sectionName).getString(key); 82 | val = val.trim().replaceAll("\\s+"," "); 83 | sectionMap.put(key,val); 84 | } 85 | } 86 | return parametersMap; 87 | } 88 | 89 | public static VigorConfiguration loadVigorConfiguration (String sourceName, 90 | INIConfiguration iniConfig, 91 | Function> flagFunction) throws VigorException { 92 | return configurationFromSectionMap(sourceName, iniFileToSectionMap(iniConfig), flagFunction); 93 | } 94 | 95 | public static VigorConfiguration configurationFromMap(String sourceName, 96 | Map configurationMap, 97 | Function> flagFunction) throws VigorException { 98 | return ConfigurationUtils.configurationFromMap(sourceName, 99 | configurationMap, 100 | flagFunction); 101 | } 102 | 103 | public static VigorConfiguration configurationFromSectionMap (String sourceName, 104 | Map> configurationMap, 105 | Function> flagFunction) 106 | throws VigorException { 107 | return ConfigurationUtils.configurationFromSectionMap(sourceName, 108 | configurationMap, 109 | flagFunction); 110 | } 111 | } 112 | 113 | 114 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/NoteType.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | public enum NoteType { 4 | RNA_Editing("non-templated G's inserted during transcription"), 5 | Sequence_Gap("coding region disrupted by sequencing gap"), 6 | Gene(""), 7 | StopCodonReadThrough("Translation Exception"), 8 | StopCodonInterruption("CDS interrupted by stop codon"), 9 | StopCodonsInterruption("CDS interrupted by many stop codons"); 10 | private final String text; 11 | 12 | NoteType ( String text ) { 13 | 14 | this.text = text; 15 | } 16 | 17 | @Override 18 | public String toString () { 19 | 20 | return text; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/NullUtil.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | import java.util.Objects; 4 | 5 | public class NullUtil { 6 | 7 | public static T nullOrElse(T obj, T defaultVal) { 8 | return obj != null ? obj : Objects.requireNonNull(defaultVal, "default value may not be null"); 9 | } 10 | 11 | public static boolean isNullOrEmpty(String str) { 12 | return str == null || str.trim().isEmpty(); 13 | } 14 | 15 | public static String emptyOrElse(String str, String defaultVal) { 16 | return ! isNullOrEmpty(str) ? str : Objects.requireNonNull(defaultVal, "default value may not be null"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/OutputContext.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | import java.util.*; 4 | 5 | public class OutputContext { 6 | 7 | public enum Key { 8 | GENOME, 9 | GENE, 10 | PEP 11 | } 12 | 13 | private final Map context = new EnumMap(Key.class); 14 | 15 | public OutputContext () { 16 | } 17 | 18 | public OutputContext addContext(Key key, String value) { 19 | context.put(key, value); 20 | return this; 21 | } 22 | 23 | public Optional getContext(Key key) { 24 | return Optional.ofNullable(context.get(key)); 25 | } 26 | 27 | public Optional removeContext(Key key) { 28 | return Optional.ofNullable(context.remove(key)); 29 | } 30 | 31 | public Set keySet() { 32 | return context.keySet(); 33 | } 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/OutputWriters.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | 4 | import java.util.HashMap; 5 | import java.util.Map; 6 | import java.util.function.Supplier; 7 | 8 | public class OutputWriters { 9 | 10 | private OutputWriters() { 11 | } 12 | 13 | public static Map> Writers = new HashMap<>(); 14 | static { 15 | Writers.put("TBL", TBLWriter::new); 16 | Writers.put("PEP", PEPWriter::new); 17 | Writers.put("CDS", CDSWriter::new); 18 | Writers.put("ALN", AlignmentWriter::new); 19 | Writers.put("SUM", SUMWriter::new); 20 | Writers.put("GFF3", GFF3Writer::new); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/PEPWriter.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | import org.apache.logging.log4j.LogManager; 4 | import org.apache.logging.log4j.Logger; 5 | import org.jcvi.jillion.core.Range; 6 | import org.jcvi.vigor.component.Exon; 7 | import org.jcvi.vigor.component.MaturePeptideMatch; 8 | import org.jcvi.vigor.component.Model; 9 | import org.jcvi.vigor.exception.VigorException; 10 | 11 | import java.io.IOException; 12 | import java.nio.file.Paths; 13 | import java.util.List; 14 | 15 | import static org.jcvi.vigor.utils.OutputWriterUtils.formatMaturePeptideRange; 16 | 17 | public class PEPWriter extends BaseOutputWriter { 18 | 19 | private static Logger LOGGER = LogManager.getLogger(PEPWriter.class); 20 | 21 | @Override 22 | public void writeModels(Outfiles outfiles, List models) throws VigorException, IOException { 23 | StringBuilder defline; 24 | long seqLength = models.get(0).getAlignment().getVirusGenome().getSequence().getLength(); 25 | OutputContext context = new OutputContext(); 26 | context.addContext(OutputContext.Key.GENOME, models.get(0).getGeneID()); 27 | // this ensures that the genome writer is closed 28 | try (WriterBundle unused = getWriter(outfiles, context, OutputContext.Key.GENOME)) { 29 | for (Model model : models) { 30 | LOGGER.trace("writing peptides for model {}", model.getGeneID()); 31 | context.addContext(OutputContext.Key.GENE, model.getGeneID()); 32 | try (WriterBundle sequenceWriter = getWriter(outfiles, context, OutputContext.Key.GENE)) { 33 | sequenceWriter.write(OutputWriterUtils.getDefline(model)); 34 | sequenceWriter.newLine(); 35 | OutputWriterUtils.writeSequence(sequenceWriter, model.getTranslatedSeq()); 36 | } 37 | // 38 | context.removeContext(OutputContext.Key.GENE); 39 | IDGenerator idGenerator = IDGenerator.of(model.getGeneID()); 40 | for (MaturePeptideMatch match : model.getMaturePeptides()) { 41 | String pepID = idGenerator.next(); 42 | context.addContext(OutputContext.Key.PEP, pepID); 43 | try (WriterBundle bw = getWriter(outfiles, context, OutputContext.Key.PEP)) { 44 | defline = new StringBuilder(); 45 | defline.append(">" + pepID); 46 | if (model.isPseudogene()) { 47 | defline.append(" pseudogene"); 48 | } 49 | defline.append(" mat_peptide"); 50 | List cdsRanges = VigorFunctionalUtils.proteinRangeToCDSRanges(model, match.getProteinRange()); 51 | // TODO handle truncation etc 52 | Exon initialExon = model.getExons().get(0); 53 | long startCoordinate = VigorFunctionalUtils.getDirectionBasedCoordinate(initialExon.getRange().getBegin(Range.CoordinateSystem.RESIDUE_BASED), seqLength, model.getDirection()); 54 | long endCoordinate = VigorFunctionalUtils.getDirectionBasedCoordinate(model.getRange().getEnd(Range.CoordinateSystem.RESIDUE_BASED), seqLength, model.getDirection()); 55 | defline.append(String.format(" location=%s", formatMaturePeptideRange(model, 56 | match, 57 | cdsRanges, 58 | Range.CoordinateSystem.RESIDUE_BASED, 59 | "..", 60 | // start_codon adjustment 61 | startCoordinate + initialExon.getFrame().getFrame() - 1, 62 | endCoordinate, true))); 63 | defline.append(String.format(" gene=\"%s\"", model.getGeneSymbol())); 64 | String product = match.getReference().getProduct(); 65 | if (!NullUtil.isNullOrEmpty(product)) { 66 | defline.append(String.format(" product=\"%s\"", VigorUtils.putativeName(product, match.isFuzzyEnd(), match.isFuzzyBegin()))); 67 | } else { 68 | LOGGER.warn("Missing product for {}", idGenerator.getCurrent()); 69 | } 70 | String refDB = model.getAlignment().getAlignmentEvidence().getMatpep_db(); 71 | if (!NullUtil.isNullOrEmpty(refDB)) { 72 | defline.append(String.format(" ref_db=\"%s\"", Paths.get(refDB).getFileName().toString())); 73 | } 74 | defline.append(String.format(" ref_id=\"%s\"", match.getReference().getProteinID())); 75 | bw.write(defline.toString()); 76 | bw.newLine(); 77 | OutputWriterUtils.writeSequence(bw, match.getProtein().toBuilder().trim(match.getProteinRange()).build()); 78 | } 79 | context.removeContext(OutputContext.Key.PEP); 80 | } 81 | } 82 | } 83 | } 84 | 85 | @Override 86 | public String getExtension() { 87 | return "pep"; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/SequenceUtils.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | import org.jcvi.jillion.align.AminoAcidSubstitutionMatrix; 4 | import org.jcvi.jillion.core.Sequence; 5 | import org.jcvi.jillion.core.residue.Frame; 6 | import org.jcvi.jillion.core.residue.aa.ProteinSequence; 7 | import org.jcvi.jillion.core.residue.nt.Nucleotide; 8 | import org.jcvi.jillion.core.residue.nt.NucleotideSequence; 9 | import org.jcvi.jillion.core.residue.nt.Triplet; 10 | 11 | import java.util.Iterator; 12 | import java.util.regex.Pattern; 13 | import java.util.stream.Stream; 14 | 15 | public class SequenceUtils { 16 | 17 | public static Triplet getNextTriplet ( Iterator iter ) { 18 | 19 | Nucleotide first = getNextNucleotide(iter); 20 | Nucleotide second = getNextNucleotide(iter); 21 | Nucleotide third = getNextNucleotide(iter); 22 | if (first == null || second == null || third == null) { 23 | return null; 24 | } 25 | return Triplet.create(first, second, third); 26 | } 27 | 28 | private static Nucleotide getNextNucleotide ( Iterator iter ) { 29 | 30 | if (!iter.hasNext()) { 31 | return null; 32 | } 33 | Nucleotide n = iter.next(); 34 | return n; 35 | } 36 | 37 | public static Iterator handleFrame ( NucleotideSequence sequence, Frame frame ) { 38 | 39 | Iterator iter; 40 | if (frame.onReverseStrand()) { 41 | iter = sequence.toBuilder().reverseComplement().iterator(); 42 | switch (frame) { 43 | case NEGATIVE_THREE: 44 | if (iter.hasNext()) { 45 | iter.next(); 46 | } 47 | case NEGATIVE_TWO: 48 | if (iter.hasNext()) { 49 | iter.next(); 50 | } 51 | break; 52 | default: 53 | break; 54 | } 55 | } else { 56 | iter = sequence.iterator(); 57 | switch (frame) { 58 | case THREE: 59 | if (iter.hasNext()) { 60 | iter.next(); 61 | } 62 | case TWO: 63 | if (iter.hasNext()) { 64 | iter.next(); 65 | } 66 | break; 67 | default: 68 | break; 69 | } 70 | } 71 | return iter; 72 | } 73 | 74 | public static Stream steamOf ( Sequence sequence, int lineLength ) { 75 | 76 | Pattern splitPattern = Pattern.compile(String.format("(?<=\\G.{%s})", lineLength)); 77 | return splitPattern.splitAsStream(sequence.toString()); 78 | } 79 | 80 | public static String elipsedSequenceString ( Sequence sequence, int leading, int trailing ) { 81 | 82 | String sequenceString = sequence.toString(); 83 | if (leading + trailing >= sequence.getLength()) { 84 | return sequenceString; 85 | } 86 | return String.join("...", 87 | sequenceString.substring(0, leading), 88 | sequenceString.substring(sequenceString.length() - 1 - trailing, sequenceString.length() - 1)); 89 | } 90 | 91 | public static double computePercentSimilarity ( ProteinSequence first, ProteinSequence second, long maxSeqLength, AminoAcidSubstitutionMatrix matrix ) { 92 | 93 | double similarity; 94 | double minLength = Math.min(first.getLength(), second.getLength()); 95 | // TODO gaps in the same place? 96 | double matches = 0; 97 | for (int i = 0; i < minLength; i++) { 98 | if (first.isGap(i) || second.isGap(i)) { 99 | continue; 100 | } 101 | matches += matrix.getValue(first.get(i), second.get(i)) > 0 ? 1 : 0; 102 | } 103 | similarity = ( matches / maxSeqLength ) * 100; 104 | if (similarity > 100) similarity = 100; 105 | return similarity; 106 | } 107 | 108 | /** 109 | * @param first 110 | * @param second 111 | * @param matrix 112 | * @return 113 | */ 114 | public static int computeMismatches ( ProteinSequence first, ProteinSequence second, AminoAcidSubstitutionMatrix matrix ) { 115 | 116 | assert ( first.getLength() == second.getLength() ); 117 | int misMatches = 0; 118 | for (int i = 0; i < first.getLength(); i++) { 119 | if (first.isGap(i) || second.isGap(i)) { 120 | continue; 121 | } 122 | misMatches += matrix.getValue(first.get(i), second.get(i)) <= 0 ? 1 : 0; 123 | } 124 | return misMatches; 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/TBLParser/TBLModel.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils.TBLParser; 2 | 3 | import java.util.List; 4 | 5 | import org.jcvi.jillion.core.Range; 6 | import org.jcvi.vigor.component.Exon; 7 | import lombok.Data; 8 | 9 | @Data 10 | public class TBLModel { 11 | 12 | private String virusGenomeID; 13 | private List exons; 14 | private String viralProteinID; 15 | private String geneID; 16 | private String product; 17 | private String note; 18 | private String gene; 19 | private boolean isPseudoGene = false; 20 | private boolean is5Partial = false; 21 | private boolean is3Partial = false; 22 | private boolean isRiboSlippage = false; 23 | private Range stopCodonReadThrough; 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/VigorLogging.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | import org.apache.logging.log4j.Marker; 4 | import org.apache.logging.log4j.MarkerManager; 5 | 6 | public class VigorLogging { 7 | 8 | // not for instantiation 9 | private void VigorLogger () { 10 | 11 | } 12 | 13 | public static final Marker VIGOR4_USER_MESSAGE = MarkerManager.getMarker("VIGOR4-USER-MESSAGE"); 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/org/jcvi/vigor/utils/WriterBundle.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | import org.apache.logging.log4j.LogManager; 4 | import org.apache.logging.log4j.Logger; 5 | 6 | import java.io.BufferedWriter; 7 | import java.io.IOException; 8 | import java.util.HashSet; 9 | import java.util.Set; 10 | import java.util.stream.Collectors; 11 | 12 | public class WriterBundle implements AutoCloseable{ 13 | private static Logger LOGGER = LogManager.getLogger(WriterBundle.class); 14 | 15 | private final BufferedWriter[] writers; 16 | private final Set borrowed = new HashSet<>(); 17 | 18 | public WriterBundle(BufferedWriter... writers) { 19 | this.writers = writers; 20 | } 21 | 22 | public void write(String value) throws IOException { 23 | for (BufferedWriter w : writers) { 24 | try { 25 | w.write(value); 26 | } catch (IOException e ) { 27 | LOGGER.error("problem writing to {}", w); 28 | throw e; 29 | } 30 | 31 | } 32 | } 33 | 34 | public void flush() throws IOException { 35 | for (BufferedWriter w : writers) { 36 | w.flush(); 37 | } 38 | } 39 | 40 | public void write(char c) throws IOException { 41 | for (BufferedWriter w: writers) { 42 | try { 43 | w.write(c); 44 | } catch (IOException e ) { 45 | LOGGER.error("problem writing to {}", w); 46 | throw e; 47 | } 48 | } 49 | } 50 | 51 | public void newLine() throws IOException { 52 | for (BufferedWriter w: writers) { 53 | try { 54 | w.newLine(); 55 | } catch (IOException e ) { 56 | LOGGER.error("problem writing to {}", w); 57 | throw e; 58 | } 59 | } 60 | } 61 | 62 | public void borrowed(BufferedWriter writer) { 63 | LOGGER.trace("{} is borrowed", writer); 64 | borrowed.add(writer); 65 | } 66 | 67 | @Override 68 | public void close() throws IOException { 69 | LOGGER.trace("borrowed writers: {}", String.join(",", borrowed.stream().map(BufferedWriter::toString).collect(Collectors.toList()))); 70 | for (BufferedWriter writer: writers) { 71 | if (! borrowed.contains(writer)) { 72 | LOGGER.trace("Closing {}", writer); 73 | try { 74 | writer.close(); 75 | } catch (IOException e) { 76 | LOGGER.warn("error closing writer {} got {}:{}", writer, e.getClass(), e.getMessage()); 77 | } 78 | } 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/main/resources/build.properties: -------------------------------------------------------------------------------- 1 | branch=${build.branch} 2 | build.time=${build.time} 3 | build.host=${build.host} 4 | vigor.version=${vigor-version} -------------------------------------------------------------------------------- /src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | logs/ 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/resources/vigorResources/config/defaults.ini: -------------------------------------------------------------------------------- 1 | 2 | # polyproteins 3 | mature_pep_mincoverage=50 4 | mature_pep_minsimilarity=40 5 | mature_pep_minidentity=25 6 | # pseudogene reporting 7 | min_pseudogene_identity=70 8 | min_pseudogene_similarity=80 9 | min_pseudogene_coverage=80 10 | 11 | #MinGapLength 12 | min_seq_gap_length=20 13 | 14 | #StartCodons 15 | start_codons=ATG 16 | start_codon_search_window=50 17 | stop_codon_search_window=50 18 | 19 | #ExonCoverage 20 | #exon_percentage_coverage=65 21 | min_missing_AA_size=10 22 | 23 | #Intron 24 | max_intron_size=2500 25 | 26 | max_aa_overlap=10 27 | max_nt_overlap=30 28 | max_align_merge_aa_gap=10 29 | 30 | #StopCodon 31 | leakystop_notFound_score=80 32 | 33 | #AlignmentModule 34 | alignment_module=exonerate 35 | 36 | output_formats = ALN, CDS, GFF3, PEP, TBL -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/RegressionTest/GenerateReferenceModels.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.RegressionTest; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.util.ArrayList; 6 | import java.util.HashMap; 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | import org.apache.logging.log4j.LogManager; 11 | import org.apache.logging.log4j.Logger; 12 | import org.jcvi.jillion.core.Range; 13 | import org.jcvi.jillion.fasta.nt.NucleotideFastaDataStore; 14 | import org.jcvi.jillion.fasta.nt.NucleotideFastaFileDataStoreBuilder; 15 | import org.jcvi.vigor.component.Alignment; 16 | import org.jcvi.vigor.component.Model; 17 | import org.jcvi.vigor.component.ViralProtein; 18 | import org.jcvi.vigor.component.VirusGenome; 19 | import org.jcvi.vigor.utils.TBLParser.TBLFileParser; 20 | import org.jcvi.vigor.utils.TBLParser.TBLModel; 21 | 22 | public class GenerateReferenceModels { 23 | 24 | private final static Logger LOGGER = LogManager.getLogger(GenerateReferenceModels.class); 25 | 26 | public Map> generateModels ( String TBLFilePath, String fastaFilePath ) throws IOException { 27 | 28 | Map> referenceModels = new HashMap<>(); 29 | if (fastaFilePath != null) { 30 | NucleotideFastaDataStore datastore = new NucleotideFastaFileDataStoreBuilder(new File(fastaFilePath)).build(); 31 | LOGGER.debug("Number of records in the fasta file are : " + datastore.getNumberOfRecords()); 32 | } 33 | TBLFileParser TBLParser = new TBLFileParser(); 34 | List TBLModels = TBLParser.getModels(TBLFilePath); 35 | LOGGER.debug("Total Number of models are :" + TBLModels.size()); 36 | for (TBLModel tblModel : TBLModels) { 37 | Model model = new Model(); 38 | List models = new ArrayList(); 39 | Alignment alignment = new Alignment(); 40 | ViralProtein viralProtein = new ViralProtein(); 41 | VirusGenome virusGenome = new VirusGenome(); 42 | model.setGeneSymbol(tblModel.getGene()); 43 | model.setGeneID(tblModel.getGeneID()); 44 | viralProtein.setProduct(tblModel.getProduct()); 45 | viralProtein.setProteinID(tblModel.getViralProteinID()); 46 | alignment.setViralProtein(viralProtein); 47 | virusGenome.setId(tblModel.getVirusGenomeID()); 48 | alignment.setVirusGenome(virusGenome); 49 | model.setAlignment(alignment); 50 | model.setExons(tblModel.getExons()); 51 | model.setPartial5p(tblModel.is5Partial()); 52 | model.setPartial3p(tblModel.is3Partial()); 53 | model.setPseudogene(tblModel.isPseudoGene()); 54 | if (tblModel.getStopCodonReadThrough() != null) 55 | model.setReplaceStopCodonRange(tblModel.getStopCodonReadThrough()); 56 | if (tblModel.isRiboSlippage()) 57 | model.setRibosomalSlippageRange(Range.of(0)); //since in TBL there is no specific row for range.we just capture if this feature exists for model 58 | String virusGenomeID = model.getAlignment().getVirusGenome().getId(); 59 | if (referenceModels.containsKey(virusGenomeID)) { 60 | models = referenceModels.get(virusGenomeID); 61 | } 62 | models.add(model); 63 | referenceModels.put(virusGenomeID, models); 64 | } 65 | LOGGER.debug(referenceModels.entrySet().size()); 66 | referenceModels.entrySet().forEach(entry -> { 67 | LOGGER.trace("genome ID: \"{}\" model count: {}", entry.getKey(), entry.getValue().size()); 68 | }); 69 | return referenceModels; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/RegressionTest/GenerateVigor4GeneModels.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.RegressionTest; 2 | 3 | import org.apache.logging.log4j.LogManager; 4 | import org.apache.logging.log4j.Logger; 5 | import org.jcvi.vigor.Application; 6 | import org.jcvi.vigor.Vigor; 7 | import org.jcvi.vigor.component.Model; 8 | import org.jcvi.vigor.exception.VigorException; 9 | import org.jcvi.vigor.utils.*; 10 | import org.junit.runner.RunWith; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.stereotype.Service; 13 | import org.springframework.test.context.ContextConfiguration; 14 | import org.springframework.test.context.junit4.SpringRunner; 15 | 16 | import java.io.IOException; 17 | import java.nio.file.Files; 18 | import java.nio.file.Path; 19 | import java.nio.file.Paths; 20 | import java.util.*; 21 | 22 | @Service 23 | @RunWith(SpringRunner.class) 24 | @ContextConfiguration(classes = Application.class) 25 | public class GenerateVigor4GeneModels { 26 | 27 | private final static Logger LOGGER = LogManager.getLogger(ValidateVigor4ModelsTest.class); 28 | 29 | private class Tuple { 30 | public final K first; 31 | public final V second; 32 | 33 | Tuple(K first, V second) { 34 | this.first = first; 35 | this.second = second; 36 | } 37 | 38 | } 39 | @Autowired 40 | Vigor vigor; 41 | 42 | public Map> generateModels ( String inputFASTA, String refDB, VigorConfiguration config ) throws VigorException { 43 | 44 | try { 45 | 46 | config.put(ConfigurationParameters.ReferenceDatabaseFile, refDB); 47 | String outputDir = config.get(ConfigurationParameters.OutputDirectory); 48 | String outputPrefix = config.get(ConfigurationParameters.OutputPrefix); 49 | Tuple outputFile = getVigor4OutputFiles(outputDir, outputPrefix); 50 | boolean overwrite = config.getOrDefault(ConfigurationParameters.OverwriteOutputFiles, false); 51 | if (! outputFile.second || overwrite) { 52 | vigor.generateAnnotations(inputFASTA, refDB, config); 53 | } 54 | return modelsFromResults(outputFile.first); 55 | } catch (IOException e) { 56 | throw new VigorException("Error generating vigor4 models", e); 57 | } 58 | } 59 | 60 | public Map> modelsFromResults ( String tblFile ) throws IOException { 61 | 62 | return modelsFromResults(tblFile, null); 63 | } 64 | 65 | public Map> modelsFromResults ( String tblFile, String inputFasta ) throws IOException { 66 | 67 | return new GenerateReferenceModels().generateModels(tblFile, inputFasta); 68 | } 69 | 70 | private Tuple getVigor4OutputFiles ( String outputDirectory, String outputPrefix ) { 71 | 72 | String tblFilePath = Paths.get(outputDirectory, outputPrefix + ".tbl").toString(); 73 | Path tblPath = Paths.get(tblFilePath); 74 | return new Tuple<>(tblFilePath, Files.exists(tblPath)); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/RegressionTest/Vigor4RegressionTestRunner.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.RegressionTest; 2 | 3 | import org.apache.logging.log4j.LogManager; 4 | import org.apache.logging.log4j.Logger; 5 | import org.jcvi.vigor.exception.VigorException; 6 | import org.jcvi.vigor.utils.ConfigurationParameters; 7 | import org.jcvi.vigor.utils.VigorUtils; 8 | import org.junit.runner.JUnitCore; 9 | 10 | import java.io.File; 11 | import java.util.HashMap; 12 | import java.util.Map; 13 | 14 | public class Vigor4RegressionTestRunner { 15 | 16 | private static Logger LOGGER = LogManager.getLogger(Vigor4RegressionTestRunner.class); 17 | 18 | public static void main ( String[] args ) { 19 | 20 | try { 21 | Map optsList = parseArguments(args); 22 | String outputDir = getOutputDirectory(optsList); 23 | System.setProperty(ConfigurationParameters.OutputDirectory.getSystemPropertyName(), outputDir); 24 | System.setProperty("vigor.regression_test.write_report","true"); 25 | JUnitCore jUnitCore = new JUnitCore(); 26 | jUnitCore.run(ValidateVigor4ModelsTest.class); 27 | } catch (VigorException e) { 28 | LOGGER.error(e); 29 | System.exit(1); 30 | } 31 | } 32 | 33 | public static Map parseArguments ( String[] args ) { 34 | 35 | Map optsList = new HashMap(); 36 | for (int i = 0; i < args.length; i++) { 37 | switch (args[ i ].charAt(0)) { 38 | case '-': 39 | if (args[ i ].length() < 2) 40 | throw new IllegalArgumentException("Not a valid argument: " + args[ i ]); 41 | else { 42 | if (args.length - 1 == i) 43 | if (args[ i ].equals("-h")) { 44 | printHelp(); 45 | } else { 46 | throw new IllegalArgumentException("Expected arg after: " + args[i]); 47 | } 48 | // -opt 49 | optsList.put(args[ i ], args[ i + 1 ]); 50 | i++; 51 | } 52 | break; 53 | } 54 | } 55 | return optsList; 56 | } 57 | 58 | public static String getOutputDirectory ( Map optsList ) throws VigorException { 59 | 60 | String outputDirectory = ""; 61 | if (optsList.get("-o") != null) { 62 | outputDirectory = optsList.get("-o"); 63 | } else { 64 | throw new VigorException("Please provide output directory \"(-o )\""); 65 | } 66 | VigorUtils.checkFilePath("Output directory", outputDirectory, 67 | VigorUtils.FileCheck.EXISTS, 68 | VigorUtils.FileCheck.DIRECTORY, 69 | VigorUtils.FileCheck.WRITE); 70 | return new File(outputDirectory).getAbsolutePath(); 71 | } 72 | 73 | private static void printHelp () { 74 | 75 | LOGGER.info("-o "); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/service/AdjustUneditedExonBoundariesTest.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service; 2 | 3 | import static junit.framework.TestCase.assertTrue; 4 | import static org.hamcrest.CoreMatchers.is; 5 | import static org.hamcrest.CoreMatchers.notNullValue; 6 | import static org.hamcrest.MatcherAssert.assertThat; 7 | import static org.junit.Assert.assertEquals; 8 | 9 | import java.io.File; 10 | import java.nio.file.Paths; 11 | import java.util.ArrayList; 12 | import java.util.Comparator; 13 | import java.util.List; 14 | import java.util.Optional; 15 | import java.util.stream.Collectors; 16 | 17 | import org.apache.logging.log4j.LogManager; 18 | import org.apache.logging.log4j.Logger; 19 | import org.jcvi.jillion.core.Range; 20 | import org.jcvi.vigor.Application; 21 | import org.jcvi.vigor.testing.category.Fast; 22 | import org.jcvi.vigor.component.Alignment; 23 | import org.jcvi.vigor.component.Model; 24 | import org.jcvi.vigor.exception.VigorException; 25 | import org.jcvi.vigor.testing.category.ReferenceDatabase; 26 | import org.jcvi.vigor.utils.ConfigurationParameters; 27 | import org.jcvi.vigor.utils.VigorConfiguration; 28 | import org.jcvi.vigor.utils.VigorTestUtils; 29 | import org.junit.Test; 30 | import org.junit.experimental.categories.Category; 31 | import org.junit.runner.RunWith; 32 | import org.springframework.beans.factory.annotation.Autowired; 33 | import org.springframework.test.context.ContextConfiguration; 34 | import org.springframework.test.context.junit4.SpringRunner; 35 | 36 | @Category({ReferenceDatabase.class, Fast.class}) 37 | @RunWith(SpringRunner.class) 38 | @ContextConfiguration(classes = Application.class) 39 | public class AdjustUneditedExonBoundariesTest { 40 | 41 | final static Logger logger = LogManager.getLogger(AdjustUneditedExonBoundariesTest.class); 42 | @Autowired 43 | private ModelGenerationService modelGenerationService; 44 | @Autowired 45 | private ViralProteinService viralProteinService; 46 | @Autowired 47 | private AdjustUneditedExonBoundaries adjustUneditedExonBoundaries; 48 | @Autowired 49 | private VigorInitializationService initializationService; 50 | 51 | @Test 52 | public void adjustSpliceSitesTest () throws CloneNotSupportedException, VigorException { 53 | 54 | VigorConfiguration defaultConfig = initializationService.mergeConfigurations(initializationService.getDefaultConfigurations()); 55 | File virusGenomeSeqFile = new File(getClass().getResource("/vigorUnitTestInput/Flua_SpliceSites_Test.fasta").getFile()); 56 | File alignmentOutput = new File(getClass().getResource("/vigorUnitTestInput/Flua_SpliceSites_Test.txt").getFile()); 57 | String referenceDBPath = defaultConfig.get(ConfigurationParameters.ReferenceDatabasePath); 58 | VigorTestUtils.assumeReferenceDB(referenceDBPath); 59 | 60 | assertThat("reference database path must be set", referenceDBPath, is(notNullValue())); 61 | List configurations = new ArrayList<>(); 62 | configurations.add(defaultConfig); 63 | configurations.addAll(initializationService.loadVirusConfiguration( new File(referenceDBPath,"flua_db.ini"))); 64 | VigorConfiguration config = initializationService.mergeConfigurations(configurations); 65 | String referenceDB = Paths.get(referenceDBPath, "flua_db").toString(); 66 | assertTrue("couldn't find reference DB", referenceDB != null); 67 | logger.info("using alignmentOutput file {} and reference database {}", alignmentOutput, referenceDB); 68 | List alignments = VigorTestUtils.getAlignments(virusGenomeSeqFile, 69 | referenceDB, alignmentOutput, config); 70 | for (int i = 0; i < alignments.size(); i++) { 71 | alignments.set(i, viralProteinService.setViralProteinAttributes(alignments.get(i), config)); 72 | } 73 | logger.info("found {} alignments", alignments.size()); 74 | List models = alignments.stream() 75 | .flatMap(x -> modelGenerationService.alignmentToModels(x, config).stream()) 76 | .collect(Collectors.toList()); 77 | logger.info("{} models for {} alignments", models.size(), alignments.size()); 78 | assertTrue("no models found for alignments", models.size() > 0); 79 | Model testModel = models.get(0); 80 | assertTrue(String.format("no exons found for test model %s", testModel), testModel.getExons().size() > 0); 81 | testModel.getExons().get(0).setRange(Range.of(11, 30)); 82 | int defaultSearchWindow = 50; 83 | int minIntronLength = 20; 84 | List outModels = adjustUneditedExonBoundaries.adjustSpliceSites(testModel, defaultSearchWindow, minIntronLength); 85 | Comparator bySpliceScore = Comparator.comparing(( m ) -> m.getScores().get(Scores.SPLICE_SCORE)); 86 | Optional outModel = outModels.stream().sorted(bySpliceScore.reversed()).findFirst(); 87 | assertTrue("No adjusted model found", outModel.isPresent()); 88 | assertEquals(Range.of(11, 40), outModel.get().getExons().get(0).getRange()); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/service/CheckCoverageTest.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service; 2 | 3 | import org.jcvi.jillion.core.Range; 4 | import org.jcvi.jillion.core.residue.Frame; 5 | import org.jcvi.jillion.core.residue.aa.AminoAcid; 6 | import org.jcvi.jillion.core.residue.aa.ProteinSequenceBuilder; 7 | import org.jcvi.jillion.core.residue.nt.NucleotideSequence; 8 | import org.jcvi.jillion.core.residue.nt.NucleotideSequenceBuilder; 9 | import org.jcvi.vigor.Application; 10 | import org.jcvi.vigor.testing.category.Fast; 11 | import org.jcvi.vigor.testing.category.Isolated; 12 | import org.jcvi.vigor.component.*; 13 | import org.junit.Test; 14 | import org.junit.experimental.categories.Category; 15 | import org.junit.runner.RunWith; 16 | import org.springframework.beans.factory.annotation.Autowired; 17 | import org.springframework.test.context.ContextConfiguration; 18 | import org.springframework.test.context.junit4.SpringRunner; 19 | 20 | import java.util.ArrayList; 21 | import java.util.List; 22 | 23 | import static org.junit.Assert.assertEquals; 24 | 25 | @Category({Fast.class, Isolated.class}) 26 | @RunWith(SpringRunner.class) 27 | @ContextConfiguration(classes = Application.class) 28 | public class CheckCoverageTest { 29 | 30 | @Autowired 31 | private CheckCoverage checkCoverage; 32 | 33 | @Test 34 | public void determineHomologyTest () { 35 | 36 | Model model = getTestModel(); 37 | NucleotideSequence cds = checkCoverage.determineCDS(model); 38 | model = checkCoverage.determineHomology(model, cds); 39 | assertEquals("VT*KS*", model.getTranslatedSeq().toString()); 40 | } 41 | 42 | @Test 43 | public void getTranslatedProteinCoordinateTest () { 44 | 45 | List exons = new ArrayList(); 46 | Exon exon1 = new Exon(); 47 | exon1.setRange(Range.of(1, 10)); 48 | exon1.setFrame(Frame.ONE); 49 | Exon exon2 = new Exon(); 50 | exon2.setRange(Range.of(11, 23)); 51 | exon2.setFrame(Frame.THREE); 52 | Exon exon3 = new Exon(); 53 | exon3.setRange(Range.of(24, 30)); 54 | exon3.setFrame(Frame.TWO); 55 | exons.add(exon1); 56 | exons.add(exon2); 57 | exons.add(exon3); 58 | // NTOffset after considering the insertion string length; 59 | long PCoordinate = checkCoverage.getTranslatedProteinCoordinate(exons, 11, Range.of(11, 12)); 60 | assertEquals(4, PCoordinate); 61 | } 62 | 63 | @Test 64 | public void getInternalStopsTest () { 65 | 66 | Model model = new Model(); 67 | List exons = new ArrayList(); 68 | Exon exon1 = new Exon(); 69 | exon1.setRange(Range.of(1, 11)); 70 | exon1.setFrame(Frame.ONE); 71 | Exon exon2 = new Exon(); 72 | exon2.setRange(Range.of(12, 22)); 73 | exon2.setFrame(Frame.TWO); 74 | Exon exon3 = new Exon(); 75 | exon3.setRange(Range.of(23, 27)); 76 | exon3.setFrame(Frame.THREE); 77 | exons.add(exon1); 78 | exons.add(exon2); 79 | exons.add(exon3); 80 | Alignment alignment = new Alignment(); 81 | VirusGenome genome = new VirusGenome(); 82 | genome.setSequence(new NucleotideSequenceBuilder("ATGAGTCTTCTAACCGAGGTCGTGACGTA").build()); 83 | alignment.setVirusGenome(genome); 84 | model.setAlignment(alignment); 85 | model.setExons(exons); 86 | model.setReplaceStopCodonRange(Range.of(1, 3)); 87 | List internalStops = checkCoverage.getInternalStops(model); 88 | assertEquals(2, internalStops.size()); 89 | } 90 | 91 | public Model getTestModel () { 92 | 93 | Model model = new Model(); 94 | List exons = new ArrayList(); 95 | Exon exon1 = new Exon(); 96 | exon1.setRange(Range.of(4, 12)); 97 | exon1.setFrame(Frame.ONE); 98 | Exon exon2 = new Exon(); 99 | exon2.setRange(Range.of(19, 22)); 100 | exon2.setFrame(Frame.ONE); 101 | Exon exon3 = new Exon(); 102 | exon3.setRange(Range.of(23, 27)); 103 | exon3.setFrame(Frame.THREE); 104 | exons.add(exon1); 105 | exons.add(exon2); 106 | exons.add(exon3); 107 | Alignment alignment = new Alignment(); 108 | VirusGenome genome = new VirusGenome(); 109 | genome.setSequence(new NucleotideSequenceBuilder("ATGAGTCTTCTAACCGAGGTCGTGACGTA").build()); 110 | alignment.setVirusGenome(genome); 111 | model.setExons(exons); 112 | ViralProtein vp = new ViralProtein(); 113 | vp.setSequence(new ProteinSequenceBuilder("VFTKSRR").build()); 114 | GeneAttributes attributes = new GeneAttributes(); 115 | StopTranslationException translationEx = new StopTranslationException(true, AminoAcid.Threonine, "", 0); 116 | attributes.setStopTranslationException(translationEx); 117 | RNA_Editing rna_editing = new RNA_Editing(true, 0, "", "AAA", ""); 118 | attributes.setRna_editing(rna_editing); 119 | vp.setGeneAttributes(attributes); 120 | alignment.setViralProtein(vp); 121 | model.setAlignment(alignment); 122 | model.setInsertRNAEditingRange(Range.of(13, 15)); 123 | model.setReplaceStopCodonRange(Range.of(7, 9)); 124 | return model; 125 | } 126 | 127 | @Test 128 | public void determineCDS () { 129 | 130 | Model model = getTestModel(); 131 | NucleotideSequence cds = checkCoverage.determineCDS(model); 132 | assertEquals("GTCTTCTAAAAATCGTGA", cds.toString()); 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/service/TestRunner.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service; 2 | 3 | import org.junit.runner.JUnitCore; 4 | import org.junit.runner.Result; 5 | import org.junit.runner.notification.Failure; 6 | 7 | public class TestRunner { 8 | 9 | public static void main ( String[] args ) { 10 | 11 | Result result = JUnitCore.runClasses(TestSuite.class); 12 | for (Failure failure : result.getFailures()) { 13 | System.out.println(failure.toString()); 14 | System.exit(0); 15 | } 16 | if (result.wasSuccessful()) { 17 | System.out.println("All tests were successful"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/service/TestSuite.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.service; 2 | 3 | import org.junit.runner.RunWith; 4 | import org.junit.runners.Suite; 5 | 6 | @RunWith(Suite.class) 7 | @Suite.SuiteClasses( { 8 | AlignmentGenerationServiceTest.class, 9 | ModelGenerationServiceTest.class, 10 | CheckCoverageTest.class, 11 | DetermineMissingExonsTest.class, 12 | PeptideServiceTest.class, 13 | DetermineStartAndStopTest.class, 14 | AdjustViralTricksTest.class, 15 | AdjustUneditedExonBoundariesTest.class 16 | }) 17 | public class TestSuite { 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/testing/category/Dummy.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.testing.category; 2 | 3 | /** 4 | * To override excludedGroups when nothing should be excluded. 5 | */ 6 | public interface Dummy { 7 | } 8 | -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/testing/category/Fast.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.testing.category; 2 | 3 | public interface Fast { 4 | // test category for quickly running tests 5 | } 6 | -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/testing/category/Integration.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.testing.category; 2 | 3 | /** 4 | * Test is an integration test 5 | */ 6 | public interface Integration { 7 | // for test categorization 8 | } 9 | -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/testing/category/Isolated.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.testing.category; 2 | 3 | /** 4 | * Test does not require external resources 5 | */ 6 | public interface Isolated { 7 | // For test categorization 8 | } 9 | -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/testing/category/ReferenceDatabase.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.testing.category; 2 | 3 | /** 4 | * Requires reference database 5 | */ 6 | public interface ReferenceDatabase { 7 | } 8 | -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/testing/category/Regression.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.testing.category; 2 | 3 | public interface Regression { 4 | // for test categorization 5 | } 6 | -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/testing/category/Slow.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.testing.category; 2 | 3 | public interface Slow { 4 | // For testing categorization 5 | } 6 | -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/utils/SequenceUtilsTest.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | import org.jcvi.jillion.align.AminoAcidSubstitutionMatrix; 4 | import org.jcvi.jillion.align.BlosumMatrices; 5 | import org.jcvi.jillion.core.Range; 6 | import org.jcvi.jillion.core.residue.aa.AminoAcid; 7 | import org.jcvi.jillion.core.residue.aa.ProteinSequence; 8 | import org.jcvi.jillion.core.residue.aa.ProteinSequenceBuilder; 9 | import org.jcvi.vigor.testing.category.Fast; 10 | import org.jcvi.vigor.testing.category.Isolated; 11 | import org.junit.Test; 12 | import org.junit.experimental.categories.Category; 13 | 14 | import static org.hamcrest.CoreMatchers.equalTo; 15 | import static org.hamcrest.MatcherAssert.assertThat; 16 | 17 | @Category({Isolated.class, Fast.class}) 18 | public class SequenceUtilsTest { 19 | 20 | @Test 21 | public void testcomputePercentSimilarity () { 22 | 23 | String proteinString = "MSLLTEVETYTLSIIPSGPL"; 24 | int proteinStringLength = proteinString.length(); 25 | ProteinSequence first = new ProteinSequenceBuilder(proteinString).build(); 26 | for (AminoAcidSubstitutionMatrix matrix : new AminoAcidSubstitutionMatrix[] { 27 | BlosumMatrices.blosum30(), 28 | BlosumMatrices.blosum40(), 29 | BlosumMatrices.blosum50(), 30 | BlosumMatrices.blosum62(), 31 | BlosumMatrices.blosum90() }) { 32 | ProteinSequence second = first.toBuilder().build(); 33 | double similarity = SequenceUtils.computePercentSimilarity(first, second, proteinStringLength, matrix); 34 | assertThat("identical sequences should be 100% similar", similarity, equalTo(100.0d)); 35 | AminoAcid firstAcid = first.get(0); 36 | for (AminoAcid acid : AminoAcid.values()) { 37 | second = second.toBuilder().replace(0, acid).build(); 38 | similarity = SequenceUtils.computePercentSimilarity(first, second, proteinStringLength, matrix); 39 | if (matrix.getValue(firstAcid, acid) > 0) { 40 | assertThat(String.format("replacing %s with an related amino acid %s should be 100%% similar", firstAcid, acid), similarity, equalTo(100.0d)); 41 | } else { 42 | assertThat(String.format("replacing %s with an unrelated amino acid %s should be 95%% similar", firstAcid, acid), similarity, equalTo(95.0d)); 43 | } 44 | } 45 | second = first.toBuilder().trim(Range.of(0, 9)).build(); 46 | similarity = SequenceUtils.computePercentSimilarity(first, second, proteinStringLength, matrix); 47 | assertThat("An identical sequence 1/2 as long should be 50% similar", similarity, equalTo(50.0d)); 48 | // the order shouldn't matter 49 | similarity = SequenceUtils.computePercentSimilarity(second, first, proteinStringLength, matrix); 50 | assertThat("A sequence compared to an identical sequence 1/2 as long should be 50% similar", similarity, equalTo(50.0d)); 51 | second = first.toBuilder().replace(0, AminoAcid.Gap).build(); 52 | similarity = SequenceUtils.computePercentSimilarity(first, second, proteinStringLength, matrix); 53 | assertThat("replace one amino acid with a gap should be 95% similar", similarity, equalTo(95.0d)); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/test/java/org/jcvi/vigor/utils/VigorTestUtils.java: -------------------------------------------------------------------------------- 1 | package org.jcvi.vigor.utils; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.util.Iterator; 6 | import java.util.List; 7 | import java.util.stream.Stream; 8 | 9 | import org.apache.logging.log4j.LogManager; 10 | import org.apache.logging.log4j.Logger; 11 | import org.jcvi.jillion.core.Range; 12 | import org.jcvi.jillion.core.datastore.DataStoreProviderHint; 13 | import org.jcvi.jillion.fasta.nt.NucleotideFastaDataStore; 14 | import org.jcvi.jillion.fasta.nt.NucleotideFastaFileDataStoreBuilder; 15 | import org.jcvi.jillion.fasta.nt.NucleotideFastaRecord; 16 | import org.jcvi.vigor.component.Alignment; 17 | import org.jcvi.vigor.component.AlignmentEvidence; 18 | import org.jcvi.vigor.component.VirusGenome; 19 | import org.jcvi.vigor.exception.VigorException; 20 | import org.jcvi.vigor.service.ExonerateService; 21 | import org.jcvi.vigor.service.ViralProteinService; 22 | import org.jcvi.vigor.service.VirusGenomeService; 23 | import org.jcvi.vigor.service.exception.ServiceException; 24 | 25 | import static org.junit.Assume.assumeTrue; 26 | 27 | public class VigorTestUtils { 28 | 29 | private static final Logger LOGGER = LogManager.getLogger(VigorTestUtils.class); 30 | 31 | public static List getAlignments ( File inputSeqFile, String refDB, File alignmentOutput, VigorConfiguration config ) throws VigorException { 32 | 33 | ExonerateService exonerateService = new ExonerateService(); 34 | ViralProteinService viralProteinService = new ViralProteinService(); 35 | try (NucleotideFastaDataStore dataStore = new NucleotideFastaFileDataStoreBuilder(inputSeqFile).hint(DataStoreProviderHint.RANDOM_ACCESS_OPTIMIZE_SPEED).build();) { 36 | Stream records = dataStore.records(); 37 | Iterator iter = records.iterator(); 38 | NucleotideFastaRecord record = iter.next(); 39 | VirusGenome virusGenome = new VirusGenome(record.getSequence(), record.getComment(), record.getId(), false); 40 | List sequenceGaps = VirusGenomeService.findSequenceGapRanges(20, virusGenome.getSequence()); 41 | virusGenome.setSequenceGaps(sequenceGaps); 42 | // create alignment evidence 43 | AlignmentEvidence alignmentEvidence = new AlignmentEvidence(); 44 | config.put(ConfigurationParameters.ReferenceDatabaseFile, refDB); 45 | List alignments = exonerateService.parseExonerateOutput(alignmentOutput, 46 | virusGenome, refDB); 47 | for (int i = 0; i < alignments.size(); i++) { 48 | alignments.set(i, viralProteinService 49 | .setViralProteinAttributes(alignments.get(i), config)); 50 | } 51 | return alignments; 52 | } catch (IOException e) { 53 | throw new ServiceException(String.format("Problem reading fasta file %s", inputSeqFile), e); 54 | } 55 | } 56 | 57 | public static void assumeReferenceDB ( String referenceDBPath ) { 58 | 59 | String skipReferenceDBTests = System.getProperty("vigor.skip_reference_db_tests"); 60 | LOGGER.info("skip reference db tests '{}'", skipReferenceDBTests); 61 | LOGGER.info("reference database path is '{}'", referenceDBPath); 62 | if (!( skipReferenceDBTests == null || skipReferenceDBTests.isEmpty() )) { 63 | LOGGER.info("skipping test if reference database pathis not set"); 64 | assumeTrue("Skipping test requiring reference database path", !( referenceDBPath == null || referenceDBPath.isEmpty() )); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/test/resources/config/RegressionTestConfig.csv: -------------------------------------------------------------------------------- 1 | referenceOutputTBL,inputFasta,referenceDatabase,referenceType 2 | vigor4ReferenceOutput/rsv/rsv.tbl,vigor4ReferenceOutput/rsv/rsv.ungapped.fasta,rsv_db,vigor4 3 | vigor4ReferenceOutput/rtva/rtva.tbl,vigor4ReferenceOutput/rtva/rtva.ungapped.fasta,rtva_db,vigor4 4 | vigor4ReferenceOutput/rtvb/rtvb.tbl,vigor4ReferenceOutput/rtvb/rtvb.ungapped.fasta,rtvb_db,vigor4 5 | vigor4ReferenceOutput/rtvc/rtvc.tbl,vigor4ReferenceOutput/rtvc/rtvc.ungapped.fasta,rtvc_db,vigor4 6 | vigor4ReferenceOutput/rtvf/rtvf.tbl,vigor4ReferenceOutput/rtvf/rtvf.ungapped.fasta,rtvf_db,vigor4 7 | vigor4ReferenceOutput/rtvg/rtvg.tbl,vigor4ReferenceOutput/rtvg/rtvg.ungapped.fasta,rtvg_db,vigor4 8 | vigor4ReferenceOutput/sapo/sapo.tbl,vigor4ReferenceOutput/sapo/sapo.ungapped.fasta,sapo_db,vigor4 9 | vigor4ReferenceOutput/wnvI/wnvI.tbl,vigor4ReferenceOutput/wnvI/wnvI.ungapped.fasta,wnvI_db,vigor4 10 | vigor4ReferenceOutput/wnvII/wnvII.tbl,vigor4ReferenceOutput/wnvII/wnvII.ungapped.fasta,wnvII_db,vigor4 11 | vigor4ReferenceOutput/zikv/zikv.tbl,vigor4ReferenceOutput/zikv/zikv.ungapped.fasta,zikv_db,vigor4 12 | vigor4ReferenceOutput/flua/flua.tbl,vigor4ReferenceOutput/flua/flua.ungapped.fasta,flua_db,vigor4 13 | vigor4ReferenceOutput/flub/flub.tbl,vigor4ReferenceOutput/flub/flub.ungapped.fasta,flub_db,vigor4 14 | vigor4ReferenceOutput/fluc/fluc.tbl,vigor4ReferenceOutput/fluc/fluc.ungapped.fasta,fluc_db,vigor4 15 | vigor4ReferenceOutput/veev/veev.tbl,vigor4ReferenceOutput/veev/veev.ungapped.fasta,veev_db,vigor4 16 | -------------------------------------------------------------------------------- /src/test/resources/log4j2-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/flua/vigor-20181008-142517.ini: -------------------------------------------------------------------------------- 1 | ; Effective configuration 20181008-142517 2 | 3 | ; source: defaults 4 | start_codon_search_window = "50" 5 | 6 | ; source: defaults 7 | min_missing_AA_size = "10" 8 | 9 | ; source: environment 10 | output_prefix = "flua" 11 | 12 | ; source: defaults 13 | min_pseudogene_coverage = "80.0" 14 | 15 | ; source: defaults 16 | min_seq_gap_length = "20" 17 | 18 | ; source: defaults 19 | alignment_module = "exonerate" 20 | 21 | ; source: defaults 22 | min_exon_size = "30" 23 | 24 | ; source: defaults 25 | StartCodons = "[ATG]" 26 | 27 | ; source: defaults 28 | mature_pep_minsimilarity = "40.0" 29 | 30 | ; source: environment 31 | verbose = "false" 32 | 33 | ; source: git/VIGOR_DB/Reference_DBs/flua_db.ini 34 | stop_score_factor = "1.0" 35 | 36 | ; source: defaults 37 | reference_database_path = "git/VIGOR_DB/Reference_DBs" 38 | 39 | ; source: defaults 40 | min_pseudogene_identity = "70.0" 41 | 42 | ; source: git/VIGOR_DB/Reference_DBs/flua_db.ini 43 | leakystop_score_factor = "1.0" 44 | 45 | ; source: git/VIGOR_DB/Reference_DBs/flua_db.ini 46 | alignment_score_factor = "1.0" 47 | 48 | ; source: defaults 49 | overwrite_output_files = "true" 50 | 51 | ; source: defaults 52 | temporary_directory = "output" 53 | 54 | ; source: defaults 55 | AAOverlap_offset = "10" 56 | 57 | ; source: git/VIGOR_DB/Reference_DBs/flua_db.ini 58 | reference_database_file = "git/VIGOR_DB/Reference_DBs/flua_db" 59 | 60 | ; source: git/VIGOR_DB/Reference_DBs/flua_db.ini 61 | max_gene_overlap = "50" 62 | 63 | ; source: git/VIGOR_DB/Reference_DBs/flua_db.ini 64 | start_score_factor = "1.0" 65 | 66 | ; source: defaults 67 | max_align_merge_aa_gap = "10" 68 | 69 | ; source: defaults 70 | mature_pep_mincoverage = "50.0" 71 | 72 | ; source: defaults 73 | stop_codon_search_window = "50" 74 | 75 | ; source: defaults 76 | leakystop_notFound_score = "80.0" 77 | 78 | ; source: defaults 79 | max_intron_size = "2500" 80 | 81 | ; source: environment 82 | output_directory = "output/flua" 83 | 84 | ; source: git/VIGOR_DB/Reference_DBs/flua_db.ini 85 | splicing_score_factor = "1.0" 86 | 87 | ; source: defaults 88 | min_pseudogene_similarity = "80.0" 89 | 90 | ; source: defaults 91 | mature_pep_minidentity = "25.0" 92 | 93 | ; source: defaults 94 | exonerate_path = "/usr/bin/exonerate" 95 | 96 | ; source: defaults 97 | NTOverlap_offset = "30" 98 | 99 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/flub/flub.tbl: -------------------------------------------------------------------------------- 1 | >Features NC_002204.1 2 | 21 2279 gene 3 | gene PB1 4 | 21 2279 CDS 5 | codon_start 1 6 | protein_id NC_002204.1.1 7 | gene PB1 8 | product polymerase PB1 9 | >Features NC_002205.1 10 | 1 2313 gene 11 | gene PB2 12 | 1 2313 CDS 13 | codon_start 1 14 | protein_id NC_002205.1.1 15 | gene PB2 16 | product polymerase PB2 17 | >Features NC_002206.1 18 | 1 2181 gene 19 | gene PA 20 | 1 2181 CDS 21 | codon_start 1 22 | protein_id NC_002206.1.1 23 | gene PA 24 | product polymerase PA 25 | >Features NC_002207.1 26 | 34 1788 gene 27 | gene HA 28 | 34 1788 CDS 29 | codon_start 1 30 | protein_id NC_002207.1.1 31 | gene HA 32 | product hemagglutinin 33 | >Features NC_002208.1 34 | 58 1740 gene 35 | gene NP 36 | 58 1740 CDS 37 | codon_start 1 38 | protein_id NC_002208.1.1 39 | gene NP 40 | product nucleoprotein 41 | >Features NC_002209.1 42 | 47 349 gene 43 | gene NB 44 | 47 349 CDS 45 | codon_start 1 46 | protein_id NC_002209.1.1 47 | gene NB 48 | product NB protein 49 | 54 1454 gene 50 | gene NA 51 | 54 1454 CDS 52 | codon_start 1 53 | protein_id NC_002209.1.2 54 | gene NA 55 | product neuraminidase 56 | >Features NC_002210.1 57 | 25 771 gene 58 | gene M1 59 | 25 771 CDS 60 | codon_start 1 61 | protein_id NC_002210.1.1 62 | gene M1 63 | product matrix protein M1 64 | 771 1100 gene 65 | gene BM2 66 | 771 1100 CDS 67 | codon_start 1 68 | protein_id NC_002210.1.2 69 | gene BM2 70 | product BM2 protein 71 | >Features NC_002211.1 72 | 43 888 gene 73 | gene NS1 74 | 43 888 CDS 75 | codon_start 1 76 | protein_id NC_002211.1.1 77 | gene NS1 78 | product non-structural protein 1 79 | 43 1066 gene 80 | gene NS2 81 | 43 75 CDS 82 | 731 1066 83 | codon_start 1 84 | protein_id NC_002211.1.2 85 | gene NS2 86 | product non-structural protein 2 87 | >Features KY289967.1 88 | 20 1774 gene 89 | gene HA 90 | 20 1774 CDS 91 | codon_start 1 92 | protein_id KY289967.1.1 93 | gene HA 94 | product hemagglutinin 95 | >Features KY289955.1 96 | 8 754 gene 97 | gene M1 98 | 8 754 CDS 99 | codon_start 1 100 | protein_id KY289955.1.1 101 | gene M1 102 | product matrix protein M1 103 | 754 1083 gene 104 | gene BM2 105 | 754 1083 CDS 106 | codon_start 1 107 | protein_id KY289955.1.2 108 | gene BM2 109 | product BM2 protein 110 | >Features KY289897.1 111 | 35 337 gene 112 | gene NB 113 | 35 337 CDS 114 | codon_start 1 115 | protein_id KY289897.1.1 116 | gene NB 117 | product NB protein 118 | 42 1442 gene 119 | gene NA 120 | 42 1442 CDS 121 | codon_start 1 122 | protein_id KY289897.1.2 123 | gene NA 124 | product neuraminidase 125 | >Features KY289887.1 126 | 47 1729 gene 127 | gene NP 128 | 47 1729 CDS 129 | codon_start 1 130 | protein_id KY289887.1.1 131 | gene NP 132 | product nucleoprotein 133 | >Features KY289884.1 134 | 16 2196 gene 135 | gene PA 136 | 16 2196 CDS 137 | codon_start 1 138 | protein_id KY289884.1.1 139 | gene PA 140 | product polymerase PA 141 | >Features KY289881.1 142 | 10 2322 gene 143 | gene PB2 144 | 10 2322 CDS 145 | codon_start 1 146 | protein_id KY289881.1.1 147 | gene PB2 148 | product polymerase PB2 149 | >Features KY289880.1 150 | 28 873 gene 151 | gene NS1 152 | 28 873 CDS 153 | codon_start 1 154 | protein_id KY289880.1.1 155 | gene NS1 156 | product non-structural protein 1 157 | 28 1051 gene 158 | gene NS2 159 | 28 60 CDS 160 | 716 1051 161 | codon_start 1 162 | protein_id KY289880.1.2 163 | gene NS2 164 | product non-structural protein 2 165 | >Features KY289864.1 166 | 8 2266 gene 167 | gene PB1 168 | 8 2266 CDS 169 | codon_start 1 170 | protein_id KY289864.1.1 171 | gene PB1 172 | product polymerase PB1 173 | >Features KY289850.1 174 | 47 1729 gene 175 | gene NP 176 | 47 1729 CDS 177 | codon_start 1 178 | protein_id KY289850.1.1 179 | gene NP 180 | product nucleoprotein 181 | >Features KY289840.1 182 | 16 2196 gene 183 | gene PA 184 | 16 2196 CDS 185 | codon_start 1 186 | protein_id KY289840.1.1 187 | gene PA 188 | product polymerase PA 189 | >Features KY289839.1 190 | 28 876 gene 191 | gene NS1 192 | 28 876 CDS 193 | codon_start 1 194 | protein_id KY289839.1.1 195 | gene NS1 196 | product non-structural protein 1 197 | 28 1054 gene 198 | gene NS2 199 | 28 63 CDS 200 | 719 1054 201 | codon_start 1 202 | protein_id KY289839.1.2 203 | gene NS2 204 | product non-structural protein 2 205 | >Features KY289838.1 206 | 33 335 gene 207 | gene NB 208 | 33 335 CDS 209 | codon_start 1 210 | protein_id KY289838.1.1 211 | gene NB 212 | product NB protein 213 | 40 1440 gene 214 | gene NA 215 | 40 1440 CDS 216 | codon_start 1 217 | protein_id KY289838.1.2 218 | gene NA 219 | product neuraminidase 220 | >Features KY289836.1 221 | 10 2322 gene 222 | gene PB2 223 | 10 2322 CDS 224 | codon_start 1 225 | protein_id KY289836.1.1 226 | gene PB2 227 | product polymerase PB2 228 | >Features KY289833.1 229 | 8 2266 gene 230 | gene PB1 231 | 8 2266 CDS 232 | codon_start 1 233 | protein_id KY289833.1.1 234 | gene PB1 235 | product polymerase PB1 236 | >Features KY289832.1 237 | 20 1777 gene 238 | gene HA 239 | 20 1777 CDS 240 | codon_start 1 241 | protein_id KY289832.1.1 242 | gene HA 243 | product hemagglutinin 244 | >Features KY289831.1 245 | 8 754 gene 246 | gene M1 247 | 8 754 CDS 248 | codon_start 1 249 | protein_id KY289831.1.1 250 | gene M1 251 | product matrix protein M1 252 | 754 1083 gene 253 | gene BM2 254 | 754 1083 CDS 255 | codon_start 1 256 | protein_id KY289831.1.2 257 | gene BM2 258 | product BM2 protein 259 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/flub/vigor-20181008-142557.ini: -------------------------------------------------------------------------------- 1 | ; Effective configuration 20181008-142557 2 | 3 | ; source: defaults 4 | start_codon_search_window = "50" 5 | 6 | ; source: defaults 7 | min_missing_AA_size = "10" 8 | 9 | ; source: environment 10 | output_prefix = "flub" 11 | 12 | ; source: defaults 13 | min_pseudogene_coverage = "80.0" 14 | 15 | ; source: defaults 16 | min_seq_gap_length = "20" 17 | 18 | ; source: defaults 19 | alignment_module = "exonerate" 20 | 21 | ; source: defaults 22 | min_exon_size = "30" 23 | 24 | ; source: defaults 25 | StartCodons = "[ATG]" 26 | 27 | ; source: defaults 28 | mature_pep_minsimilarity = "40.0" 29 | 30 | ; source: environment 31 | verbose = "false" 32 | 33 | ; source: git/VIGOR_DB/Reference_DBs/flub_db.ini 34 | stop_score_factor = "1.0" 35 | 36 | ; source: defaults 37 | reference_database_path = "git/VIGOR_DB/Reference_DBs" 38 | 39 | ; source: defaults 40 | min_pseudogene_identity = "70.0" 41 | 42 | ; source: git/VIGOR_DB/Reference_DBs/flub_db.ini 43 | leakystop_score_factor = "1.0" 44 | 45 | ; source: git/VIGOR_DB/Reference_DBs/flub_db.ini 46 | alignment_score_factor = "1.0" 47 | 48 | ; source: defaults 49 | overwrite_output_files = "true" 50 | 51 | ; source: defaults 52 | temporary_directory = "output" 53 | 54 | ; source: defaults 55 | AAOverlap_offset = "10" 56 | 57 | ; source: git/VIGOR_DB/Reference_DBs/flub_db.ini 58 | reference_database_file = "git/VIGOR_DB/Reference_DBs/flub_db" 59 | 60 | ; source: git/VIGOR_DB/Reference_DBs/flub_db.ini 61 | max_gene_overlap = "50" 62 | 63 | ; source: git/VIGOR_DB/Reference_DBs/flub_db.ini 64 | start_score_factor = "1.0" 65 | 66 | ; source: defaults 67 | max_align_merge_aa_gap = "10" 68 | 69 | ; source: defaults 70 | mature_pep_mincoverage = "50.0" 71 | 72 | ; source: defaults 73 | stop_codon_search_window = "50" 74 | 75 | ; source: defaults 76 | leakystop_notFound_score = "80.0" 77 | 78 | ; source: defaults 79 | max_intron_size = "2500" 80 | 81 | ; source: environment 82 | output_directory = "output/flub" 83 | 84 | ; source: git/VIGOR_DB/Reference_DBs/flub_db.ini 85 | splicing_score_factor = "1.0" 86 | 87 | ; source: defaults 88 | min_pseudogene_similarity = "80.0" 89 | 90 | ; source: defaults 91 | mature_pep_minidentity = "25.0" 92 | 93 | ; source: defaults 94 | exonerate_path = "/usr/bin/exonerate" 95 | 96 | ; source: defaults 97 | NTOverlap_offset = "30" 98 | 99 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/fluc/vigor-20181008-235317.ini: -------------------------------------------------------------------------------- 1 | ; Effective configuration 20181008-235317 2 | 3 | ; source: defaults 4 | max_align_merge_aa_gap = "10" 5 | 6 | ; source: environment 7 | verbose = "false" 8 | 9 | ; source: defaults 10 | min_missing_AA_size = "10" 11 | 12 | ; source: defaults 13 | mature_pep_mincoverage = "50.0" 14 | 15 | ; source: defaults 16 | start_codon_search_window = "50" 17 | 18 | ; source: git/VIGOR_DB/Reference_DBs/fluc_db.ini 19 | leakystop_score_factor = "1.0" 20 | 21 | ; source: git/VIGOR_DB/Reference_DBs/fluc_db.ini 22 | reference_database_file = "git/VIGOR_DB/Reference_DBs/fluc_db" 23 | 24 | ; source: git/VIGOR_DB/Reference_DBs/fluc_db.ini 25 | alignment_score_factor = "1.0" 26 | 27 | ; source: defaults 28 | NTOverlap_offset = "30" 29 | 30 | ; source: git/VIGOR_DB/Reference_DBs/fluc_db.ini 31 | start_score_factor = "1.0" 32 | 33 | ; source: defaults 34 | min_exon_size = "30" 35 | 36 | ; source: defaults 37 | overwrite_output_files = "true" 38 | 39 | ; source: defaults 40 | reference_database_path = "git/VIGOR_DB/Reference_DBs" 41 | 42 | ; source: defaults 43 | min_pseudogene_identity = "70.0" 44 | 45 | ; source: defaults 46 | StartCodons = "[ATG]" 47 | 48 | ; source: defaults 49 | max_intron_size = "2500" 50 | 51 | ; source: environment 52 | output_prefix = "fluc" 53 | 54 | ; source: defaults 55 | mature_pep_minsimilarity = "40.0" 56 | 57 | ; source: git/VIGOR_DB/Reference_DBs/fluc_db.ini 58 | stop_score_factor = "1.0" 59 | 60 | ; source: defaults 61 | mature_pep_minidentity = "25.0" 62 | 63 | ; source: defaults 64 | min_pseudogene_similarity = "80.0" 65 | 66 | ; source: defaults 67 | alignment_module = "exonerate" 68 | 69 | ; source: defaults 70 | AAOverlap_offset = "10" 71 | 72 | ; source: defaults 73 | min_pseudogene_coverage = "80.0" 74 | 75 | ; source: git/VIGOR_DB/Reference_DBs/fluc_db.ini 76 | max_gene_overlap = "50" 77 | 78 | ; source: defaults 79 | exonerate_path = "/usr/bin/exonerate" 80 | 81 | ; source: defaults 82 | leakystop_notFound_score = "80.0" 83 | 84 | ; source: defaults 85 | temporary_directory = "output" 86 | 87 | ; source: defaults 88 | min_seq_gap_length = "20" 89 | 90 | ; source: environment 91 | output_directory = "output/fluc" 92 | 93 | ; source: git/VIGOR_DB/Reference_DBs/fluc_db.ini 94 | splicing_score_factor = "1.0" 95 | 96 | ; source: defaults 97 | stop_codon_search_window = "50" 98 | 99 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/rsv/vigor-20181008-125513.ini: -------------------------------------------------------------------------------- 1 | ; Effective configuration 20181008-125513 2 | 3 | ; source: defaults 4 | start_codon_search_window = "50" 5 | 6 | ; source: defaults 7 | min_missing_AA_size = "10" 8 | 9 | ; source: environment 10 | output_prefix = "rsv" 11 | 12 | ; source: defaults 13 | min_pseudogene_coverage = "80.0" 14 | 15 | ; source: defaults 16 | min_seq_gap_length = "20" 17 | 18 | ; source: defaults 19 | alignment_module = "exonerate" 20 | 21 | ; source: defaults 22 | min_exon_size = "30" 23 | 24 | ; source: defaults 25 | StartCodons = "[ATG]" 26 | 27 | ; source: defaults 28 | mature_pep_minsimilarity = "40.0" 29 | 30 | ; source: environment 31 | verbose = "false" 32 | 33 | ; source: git/VIGOR_DB/Reference_DBs/rsv_db.ini 34 | stop_score_factor = "1.0" 35 | 36 | ; source: defaults 37 | reference_database_path = "git/VIGOR_DB/Reference_DBs" 38 | 39 | ; source: defaults 40 | min_pseudogene_identity = "70.0" 41 | 42 | ; source: git/VIGOR_DB/Reference_DBs/rsv_db.ini 43 | leakystop_score_factor = "1.0" 44 | 45 | ; source: git/VIGOR_DB/Reference_DBs/rsv_db.ini 46 | alignment_score_factor = "1.0" 47 | 48 | ; source: defaults 49 | overwrite_output_files = "true" 50 | 51 | ; source: defaults 52 | temporary_directory = "output" 53 | 54 | ; source: defaults 55 | AAOverlap_offset = "10" 56 | 57 | ; source: git/VIGOR_DB/Reference_DBs/rsv_db.ini 58 | reference_database_file = "git/VIGOR_DB/Reference_DBs/rsv_db" 59 | 60 | ; source: git/VIGOR_DB/Reference_DBs/rsv_db.ini 61 | max_gene_overlap = "50" 62 | 63 | ; source: git/VIGOR_DB/Reference_DBs/rsv_db.ini 64 | start_score_factor = "1.0" 65 | 66 | ; source: defaults 67 | max_align_merge_aa_gap = "10" 68 | 69 | ; source: defaults 70 | mature_pep_mincoverage = "50.0" 71 | 72 | ; source: defaults 73 | stop_codon_search_window = "50" 74 | 75 | ; source: defaults 76 | leakystop_notFound_score = "80.0" 77 | 78 | ; source: defaults 79 | max_intron_size = "2500" 80 | 81 | ; source: environment 82 | output_directory = "output/rsv" 83 | 84 | ; source: git/VIGOR_DB/Reference_DBs/rsv_db.ini 85 | splicing_score_factor = "1.0" 86 | 87 | ; source: defaults 88 | min_pseudogene_similarity = "80.0" 89 | 90 | ; source: defaults 91 | mature_pep_minidentity = "25.0" 92 | 93 | ; source: defaults 94 | exonerate_path = "/usr/bin/exonerate" 95 | 96 | ; source: defaults 97 | NTOverlap_offset = "30" 98 | 99 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/rtva/vigor-20181008-131714.ini: -------------------------------------------------------------------------------- 1 | ; Effective configuration 20181008-131714 2 | 3 | ; source: defaults 4 | start_codon_search_window = "50" 5 | 6 | ; source: defaults 7 | min_missing_AA_size = "10" 8 | 9 | ; source: environment 10 | output_prefix = "rtva" 11 | 12 | ; source: defaults 13 | min_pseudogene_coverage = "80.0" 14 | 15 | ; source: defaults 16 | min_seq_gap_length = "20" 17 | 18 | ; source: defaults 19 | alignment_module = "exonerate" 20 | 21 | ; source: defaults 22 | min_exon_size = "30" 23 | 24 | ; source: defaults 25 | StartCodons = "[ATG]" 26 | 27 | ; source: defaults 28 | mature_pep_minsimilarity = "40.0" 29 | 30 | ; source: environment 31 | verbose = "false" 32 | 33 | ; source: git/VIGOR_DB/Reference_DBs/rtva_db.ini 34 | stop_score_factor = "1.0" 35 | 36 | ; source: defaults 37 | reference_database_path = "git/VIGOR_DB/Reference_DBs" 38 | 39 | ; source: defaults 40 | min_pseudogene_identity = "70.0" 41 | 42 | ; source: git/VIGOR_DB/Reference_DBs/rtva_db.ini 43 | leakystop_score_factor = "1.0" 44 | 45 | ; source: git/VIGOR_DB/Reference_DBs/rtva_db.ini 46 | alignment_score_factor = "1.0" 47 | 48 | ; source: defaults 49 | overwrite_output_files = "true" 50 | 51 | ; source: defaults 52 | temporary_directory = "output" 53 | 54 | ; source: defaults 55 | AAOverlap_offset = "10" 56 | 57 | ; source: git/VIGOR_DB/Reference_DBs/rtva_db.ini 58 | reference_database_file = "git/VIGOR_DB/Reference_DBs/rtva_db" 59 | 60 | ; source: git/VIGOR_DB/Reference_DBs/rtva_db.ini 61 | max_gene_overlap = "50" 62 | 63 | ; source: git/VIGOR_DB/Reference_DBs/rtva_db.ini 64 | start_score_factor = "1.0" 65 | 66 | ; source: defaults 67 | max_align_merge_aa_gap = "10" 68 | 69 | ; source: defaults 70 | mature_pep_mincoverage = "50.0" 71 | 72 | ; source: defaults 73 | stop_codon_search_window = "50" 74 | 75 | ; source: defaults 76 | leakystop_notFound_score = "80.0" 77 | 78 | ; source: defaults 79 | max_intron_size = "2500" 80 | 81 | ; source: environment 82 | output_directory = "output/rtva" 83 | 84 | ; source: git/VIGOR_DB/Reference_DBs/rtva_db.ini 85 | splicing_score_factor = "1.0" 86 | 87 | ; source: defaults 88 | min_pseudogene_similarity = "80.0" 89 | 90 | ; source: defaults 91 | mature_pep_minidentity = "25.0" 92 | 93 | ; source: defaults 94 | exonerate_path = "/usr/bin/exonerate" 95 | 96 | ; source: defaults 97 | NTOverlap_offset = "30" 98 | 99 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/rtvb/vigor-20181008-133203.ini: -------------------------------------------------------------------------------- 1 | ; Effective configuration 20181008-133203 2 | 3 | ; source: defaults 4 | start_codon_search_window = "50" 5 | 6 | ; source: defaults 7 | min_missing_AA_size = "10" 8 | 9 | ; source: environment 10 | output_prefix = "rtvb" 11 | 12 | ; source: defaults 13 | min_pseudogene_coverage = "80.0" 14 | 15 | ; source: defaults 16 | min_seq_gap_length = "20" 17 | 18 | ; source: defaults 19 | alignment_module = "exonerate" 20 | 21 | ; source: defaults 22 | min_exon_size = "30" 23 | 24 | ; source: defaults 25 | StartCodons = "[ATG]" 26 | 27 | ; source: defaults 28 | mature_pep_minsimilarity = "40.0" 29 | 30 | ; source: environment 31 | verbose = "false" 32 | 33 | ; source: git/VIGOR_DB/Reference_DBs/rtvb_db.ini 34 | stop_score_factor = "1.0" 35 | 36 | ; source: defaults 37 | reference_database_path = "git/VIGOR_DB/Reference_DBs" 38 | 39 | ; source: defaults 40 | min_pseudogene_identity = "70.0" 41 | 42 | ; source: git/VIGOR_DB/Reference_DBs/rtvb_db.ini 43 | leakystop_score_factor = "1.0" 44 | 45 | ; source: git/VIGOR_DB/Reference_DBs/rtvb_db.ini 46 | alignment_score_factor = "1.0" 47 | 48 | ; source: defaults 49 | overwrite_output_files = "true" 50 | 51 | ; source: defaults 52 | temporary_directory = "output" 53 | 54 | ; source: defaults 55 | AAOverlap_offset = "10" 56 | 57 | ; source: git/VIGOR_DB/Reference_DBs/rtvb_db.ini 58 | reference_database_file = "git/VIGOR_DB/Reference_DBs/rtvb_db" 59 | 60 | ; source: git/VIGOR_DB/Reference_DBs/rtvb_db.ini 61 | max_gene_overlap = "50" 62 | 63 | ; source: git/VIGOR_DB/Reference_DBs/rtvb_db.ini 64 | start_score_factor = "1.0" 65 | 66 | ; source: defaults 67 | max_align_merge_aa_gap = "10" 68 | 69 | ; source: defaults 70 | mature_pep_mincoverage = "50.0" 71 | 72 | ; source: defaults 73 | stop_codon_search_window = "50" 74 | 75 | ; source: defaults 76 | leakystop_notFound_score = "80.0" 77 | 78 | ; source: defaults 79 | max_intron_size = "2500" 80 | 81 | ; source: environment 82 | output_directory = "output/rtvb" 83 | 84 | ; source: git/VIGOR_DB/Reference_DBs/rtvb_db.ini 85 | splicing_score_factor = "1.0" 86 | 87 | ; source: defaults 88 | min_pseudogene_similarity = "80.0" 89 | 90 | ; source: defaults 91 | mature_pep_minidentity = "25.0" 92 | 93 | ; source: defaults 94 | exonerate_path = "/usr/bin/exonerate" 95 | 96 | ; source: defaults 97 | NTOverlap_offset = "30" 98 | 99 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/rtvc/vigor-20181008-133256.ini: -------------------------------------------------------------------------------- 1 | ; Effective configuration 20181008-133256 2 | 3 | ; source: defaults 4 | start_codon_search_window = "50" 5 | 6 | ; source: defaults 7 | min_missing_AA_size = "10" 8 | 9 | ; source: environment 10 | output_prefix = "rtvc" 11 | 12 | ; source: defaults 13 | min_pseudogene_coverage = "80.0" 14 | 15 | ; source: defaults 16 | min_seq_gap_length = "20" 17 | 18 | ; source: defaults 19 | alignment_module = "exonerate" 20 | 21 | ; source: defaults 22 | min_exon_size = "30" 23 | 24 | ; source: defaults 25 | StartCodons = "[ATG]" 26 | 27 | ; source: defaults 28 | mature_pep_minsimilarity = "40.0" 29 | 30 | ; source: environment 31 | verbose = "false" 32 | 33 | ; source: git/VIGOR_DB/Reference_DBs/rtvc_db.ini 34 | stop_score_factor = "1.0" 35 | 36 | ; source: defaults 37 | reference_database_path = "git/VIGOR_DB/Reference_DBs" 38 | 39 | ; source: defaults 40 | min_pseudogene_identity = "70.0" 41 | 42 | ; source: git/VIGOR_DB/Reference_DBs/rtvc_db.ini 43 | leakystop_score_factor = "1.0" 44 | 45 | ; source: git/VIGOR_DB/Reference_DBs/rtvc_db.ini 46 | alignment_score_factor = "1.0" 47 | 48 | ; source: defaults 49 | overwrite_output_files = "true" 50 | 51 | ; source: defaults 52 | temporary_directory = "output" 53 | 54 | ; source: defaults 55 | AAOverlap_offset = "10" 56 | 57 | ; source: git/VIGOR_DB/Reference_DBs/rtvc_db.ini 58 | reference_database_file = "git/VIGOR_DB/Reference_DBs/rtvc_db" 59 | 60 | ; source: git/VIGOR_DB/Reference_DBs/rtvc_db.ini 61 | max_gene_overlap = "50" 62 | 63 | ; source: git/VIGOR_DB/Reference_DBs/rtvc_db.ini 64 | start_score_factor = "1.0" 65 | 66 | ; source: defaults 67 | max_align_merge_aa_gap = "10" 68 | 69 | ; source: defaults 70 | mature_pep_mincoverage = "50.0" 71 | 72 | ; source: defaults 73 | stop_codon_search_window = "50" 74 | 75 | ; source: defaults 76 | leakystop_notFound_score = "80.0" 77 | 78 | ; source: defaults 79 | max_intron_size = "2500" 80 | 81 | ; source: environment 82 | output_directory = "output/rtvc" 83 | 84 | ; source: git/VIGOR_DB/Reference_DBs/rtvc_db.ini 85 | splicing_score_factor = "1.0" 86 | 87 | ; source: defaults 88 | min_pseudogene_similarity = "80.0" 89 | 90 | ; source: defaults 91 | mature_pep_minidentity = "25.0" 92 | 93 | ; source: defaults 94 | exonerate_path = "/usr/bin/exonerate" 95 | 96 | ; source: defaults 97 | NTOverlap_offset = "30" 98 | 99 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/rtvf/rtvf.gff3: -------------------------------------------------------------------------------- 1 | ##gff-version 3 2 | NC_021625.1 vigor gene 19 3279 . + 0 ID=NC_021625.1.1;Name=VP1; 3 | NC_021625.1 vigor mRNA 19 3279 . + 0 ID=NC_021625.1.1.1;Parent=NC_021625.1.1; 4 | NC_021625.1 vigor exon 19 3279 . + 0 ID=NC_021625.1.1.1.1;Parent=NC_021625.1.1.1; 5 | NC_021625.1 vigor CDS 19 3279 . + 0 ID=NC_021625.1.1.1.2;Parent=NC_021625.1.1; 6 | NC_021626.1 vigor gene 17 2731 . + 0 ID=NC_021626.1.1;Name=VP2; 7 | NC_021626.1 vigor mRNA 17 2731 . + 0 ID=NC_021626.1.1.1;Parent=NC_021626.1.1; 8 | NC_021626.1 vigor exon 17 2731 . + 0 ID=NC_021626.1.1.1.1;Parent=NC_021626.1.1.1; 9 | NC_021626.1 vigor CDS 17 2731 . + 0 ID=NC_021626.1.1.1.2;Parent=NC_021626.1.1; 10 | NC_021631.1 vigor gene 12 2228 . + 0 ID=NC_021631.1.1;Name=VP4; 11 | NC_021631.1 vigor mRNA 12 2228 . + 0 ID=NC_021631.1.1.1;Parent=NC_021631.1.1; 12 | NC_021631.1 vigor exon 12 2228 . + 0 ID=NC_021631.1.1.1.1;Parent=NC_021631.1.1.1; 13 | NC_021631.1 vigor CDS 12 2228 . + 0 ID=NC_021631.1.1.1.2;Parent=NC_021631.1.1; 14 | NC_021630.1 vigor gene 40 2124 . + 0 ID=NC_021630.1.1;Name=VP3; 15 | NC_021630.1 vigor mRNA 40 2124 . + 0 ID=NC_021630.1.1.1;Parent=NC_021630.1.1; 16 | NC_021630.1 vigor exon 40 2124 . + 0 ID=NC_021630.1.1.1.1;Parent=NC_021630.1.1.1; 17 | NC_021630.1 vigor CDS 40 2124 . + 0 ID=NC_021630.1.1.1.2;Parent=NC_021630.1.1; 18 | NC_021632.1 vigor gene 27 1670 . + 0 ID=NC_021632.1.1;Name=NSP1; 19 | NC_021632.1 vigor mRNA 27 1670 . + 0 ID=NC_021632.1.1.1;Parent=NC_021632.1.1; 20 | NC_021632.1 vigor exon 27 1670 . + 0 ID=NC_021632.1.1.1.1;Parent=NC_021632.1.1.1; 21 | NC_021632.1 vigor CDS 27 1670 . + 0 ID=NC_021632.1.1.1.2;Parent=NC_021632.1.1; 22 | NC_021635.1 vigor gene 26 1216 . + 0 ID=NC_021635.1.1;Name=VP6; 23 | NC_021635.1 vigor mRNA 26 1216 . + 0 ID=NC_021635.1.1.1;Parent=NC_021635.1.1; 24 | NC_021635.1 vigor exon 26 1216 . + 0 ID=NC_021635.1.1.1.1;Parent=NC_021635.1.1.1; 25 | NC_021635.1 vigor CDS 26 1216 . + 0 ID=NC_021635.1.1.1.2;Parent=NC_021635.1.1; 26 | NC_021633.1 vigor gene 73 1185 . + 0 ID=NC_021633.1.1;Name=NSP3; 27 | NC_021633.1 vigor mRNA 73 1185 . + 0 ID=NC_021633.1.1.1;Parent=NC_021633.1.1; 28 | NC_021633.1 vigor exon 73 1185 . + 0 ID=NC_021633.1.1.1.1;Parent=NC_021633.1.1.1; 29 | NC_021633.1 vigor CDS 73 1185 . + 0 ID=NC_021633.1.1.1.2;Parent=NC_021633.1.1; 30 | NC_021628.1 vigor gene 56 1012 . + 0 ID=NC_021628.1.1;Name=NSP2; 31 | NC_021628.1 vigor mRNA 56 1012 . + 0 ID=NC_021628.1.1.1;Parent=NC_021628.1.1; 32 | NC_021628.1 vigor exon 56 1012 . + 0 ID=NC_021628.1.1.1.1;Parent=NC_021628.1.1.1; 33 | NC_021628.1 vigor CDS 56 1012 . + 0 ID=NC_021628.1.1.1.2;Parent=NC_021628.1.1; 34 | NC_021627.1 vigor gene 70 957 . + 0 ID=NC_021627.1.1;Name=VP7; 35 | NC_021627.1 vigor mRNA 70 957 . + 0 ID=NC_021627.1.1.1;Parent=NC_021627.1.1; 36 | NC_021627.1 vigor exon 70 957 . + 0 ID=NC_021627.1.1.1.1;Parent=NC_021627.1.1.1; 37 | NC_021627.1 vigor CDS 70 957 . + 0 ID=NC_021627.1.1.1.2;Parent=NC_021627.1.1; 38 | NC_021629.1 vigor gene 18 674 . + 0 ID=NC_021629.1.1;Name=NSP5; 39 | NC_021629.1 vigor mRNA 18 674 . + 0 ID=NC_021629.1.1.1;Parent=NC_021629.1.1; 40 | NC_021629.1 vigor exon 18 674 . + 0 ID=NC_021629.1.1.1.1;Parent=NC_021629.1.1.1; 41 | NC_021629.1 vigor CDS 18 674 . + 0 ID=NC_021629.1.1.1.2;Parent=NC_021629.1.1; 42 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/rtvf/rtvf.tbl: -------------------------------------------------------------------------------- 1 | >Features NC_021625.1 2 | 19 3279 gene 3 | gene VP1 4 | 19 3279 CDS 5 | codon_start 1 6 | protein_id NC_021625.1.1 7 | gene VP1 8 | product RNA dependent RNA polymerase VP1 9 | >Features NC_021626.1 10 | 17 2731 gene 11 | gene VP2 12 | 17 2731 CDS 13 | codon_start 1 14 | protein_id NC_021626.1.1 15 | gene VP2 16 | product core capsid protein VP2 17 | >Features NC_021631.1 18 | 12 2228 gene 19 | gene VP4 20 | 12 2228 CDS 21 | codon_start 1 22 | protein_id NC_021631.1.1 23 | gene VP4 24 | product outer capsid spike protein VP4 25 | >Features NC_021630.1 26 | 40 2124 gene 27 | gene VP3 28 | 40 2124 CDS 29 | codon_start 1 30 | protein_id NC_021630.1.1 31 | gene VP3 32 | product RNA capping protein VP3 33 | >Features NC_021632.1 34 | 27 1670 gene 35 | gene NSP1 36 | 27 1670 CDS 37 | codon_start 1 38 | protein_id NC_021632.1.1 39 | gene NSP1 40 | product non-structural protein 1 41 | >Features NC_021635.1 42 | 26 1216 gene 43 | gene VP6 44 | 26 1216 CDS 45 | codon_start 1 46 | protein_id NC_021635.1.1 47 | gene VP6 48 | product inner capsid Protein VP6 49 | >Features NC_021633.1 50 | 73 1185 gene 51 | gene NSP3 52 | 73 1185 CDS 53 | codon_start 1 54 | protein_id NC_021633.1.1 55 | gene NSP3 56 | product non-structural protein 3 57 | >Features NC_021628.1 58 | 56 1012 gene 59 | gene NSP2 60 | 56 1012 CDS 61 | codon_start 1 62 | protein_id NC_021628.1.1 63 | gene NSP2 64 | product non-structural protein 2 65 | >Features NC_021627.1 66 | 70 957 gene 67 | gene VP7 68 | 70 957 CDS 69 | codon_start 1 70 | protein_id NC_021627.1.1 71 | gene VP7 72 | product capsid glycoprotein VP7 73 | >Features NC_021629.1 74 | 18 674 gene 75 | gene NSP5 76 | 18 674 CDS 77 | codon_start 1 78 | protein_id NC_021629.1.1 79 | gene NSP5 80 | product non-structural protein 5 81 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/rtvf/vigor-20181008-133340.ini: -------------------------------------------------------------------------------- 1 | ; Effective configuration 20181008-133340 2 | 3 | ; source: defaults 4 | start_codon_search_window = "50" 5 | 6 | ; source: environment 7 | output_prefix = "rtvf" 8 | 9 | ; source: defaults 10 | min_missing_AA_size = "10" 11 | 12 | ; source: defaults 13 | min_pseudogene_coverage = "80.0" 14 | 15 | ; source: defaults 16 | min_seq_gap_length = "20" 17 | 18 | ; source: defaults 19 | alignment_module = "exonerate" 20 | 21 | ; source: defaults 22 | min_exon_size = "30" 23 | 24 | ; source: defaults 25 | StartCodons = "[ATG]" 26 | 27 | ; source: defaults 28 | mature_pep_minsimilarity = "40.0" 29 | 30 | ; source: environment 31 | verbose = "false" 32 | 33 | ; source: defaults 34 | reference_database_path = "git/VIGOR_DB/Reference_DBs" 35 | 36 | ; source: defaults 37 | min_pseudogene_identity = "70.0" 38 | 39 | ; source: defaults 40 | overwrite_output_files = "true" 41 | 42 | ; source: defaults 43 | temporary_directory = "output" 44 | 45 | ; source: defaults 46 | AAOverlap_offset = "10" 47 | 48 | ; source: environment 49 | reference_database_file = "git/VIGOR_DB/Reference_DBs/rtvf_db" 50 | 51 | ; source: defaults 52 | max_align_merge_aa_gap = "10" 53 | 54 | ; source: defaults 55 | mature_pep_mincoverage = "50.0" 56 | 57 | ; source: defaults 58 | stop_codon_search_window = "50" 59 | 60 | ; source: defaults 61 | leakystop_notFound_score = "80.0" 62 | 63 | ; source: defaults 64 | max_intron_size = "2500" 65 | 66 | ; source: environment 67 | output_directory = "output/rtvf" 68 | 69 | ; source: defaults 70 | min_pseudogene_similarity = "80.0" 71 | 72 | ; source: defaults 73 | mature_pep_minidentity = "25.0" 74 | 75 | ; source: defaults 76 | exonerate_path = "/usr/bin/exonerate" 77 | 78 | ; source: defaults 79 | NTOverlap_offset = "30" 80 | 81 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/rtvg/vigor-20181008-133348.ini: -------------------------------------------------------------------------------- 1 | ; Effective configuration 20181008-133348 2 | 3 | ; source: defaults 4 | start_codon_search_window = "50" 5 | 6 | ; source: environment 7 | output_prefix = "rtvg" 8 | 9 | ; source: defaults 10 | min_missing_AA_size = "10" 11 | 12 | ; source: defaults 13 | min_pseudogene_coverage = "80.0" 14 | 15 | ; source: defaults 16 | min_seq_gap_length = "20" 17 | 18 | ; source: defaults 19 | alignment_module = "exonerate" 20 | 21 | ; source: defaults 22 | min_exon_size = "30" 23 | 24 | ; source: defaults 25 | StartCodons = "[ATG]" 26 | 27 | ; source: defaults 28 | mature_pep_minsimilarity = "40.0" 29 | 30 | ; source: environment 31 | verbose = "false" 32 | 33 | ; source: git/VIGOR_DB/Reference_DBs/rtvg_db.ini 34 | stop_score_factor = "1.0" 35 | 36 | ; source: defaults 37 | reference_database_path = "git/VIGOR_DB/Reference_DBs" 38 | 39 | ; source: defaults 40 | min_pseudogene_identity = "70.0" 41 | 42 | ; source: git/VIGOR_DB/Reference_DBs/rtvg_db.ini 43 | leakystop_score_factor = "1.0" 44 | 45 | ; source: git/VIGOR_DB/Reference_DBs/rtvg_db.ini 46 | alignment_score_factor = "1.0" 47 | 48 | ; source: defaults 49 | overwrite_output_files = "true" 50 | 51 | ; source: defaults 52 | temporary_directory = "output" 53 | 54 | ; source: defaults 55 | AAOverlap_offset = "10" 56 | 57 | ; source: git/VIGOR_DB/Reference_DBs/rtvg_db.ini 58 | reference_database_file = "git/VIGOR_DB/Reference_DBs/rtvg_db" 59 | 60 | ; source: git/VIGOR_DB/Reference_DBs/rtvg_db.ini 61 | max_gene_overlap = "50" 62 | 63 | ; source: git/VIGOR_DB/Reference_DBs/rtvg_db.ini 64 | start_score_factor = "1.0" 65 | 66 | ; source: defaults 67 | max_align_merge_aa_gap = "10" 68 | 69 | ; source: defaults 70 | mature_pep_mincoverage = "50.0" 71 | 72 | ; source: defaults 73 | stop_codon_search_window = "50" 74 | 75 | ; source: defaults 76 | leakystop_notFound_score = "80.0" 77 | 78 | ; source: defaults 79 | max_intron_size = "2500" 80 | 81 | ; source: environment 82 | output_directory = "output/rtvg" 83 | 84 | ; source: git/VIGOR_DB/Reference_DBs/rtvg_db.ini 85 | splicing_score_factor = "1.0" 86 | 87 | ; source: defaults 88 | min_pseudogene_similarity = "80.0" 89 | 90 | ; source: defaults 91 | mature_pep_minidentity = "25.0" 92 | 93 | ; source: defaults 94 | exonerate_path = "/usr/bin/exonerate" 95 | 96 | ; source: defaults 97 | NTOverlap_offset = "30" 98 | 99 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/sapo/vigor-20181008-133418.ini: -------------------------------------------------------------------------------- 1 | ; Effective configuration 20181008-133418 2 | 3 | ; source: defaults 4 | start_codon_search_window = "50" 5 | 6 | ; source: defaults 7 | min_missing_AA_size = "10" 8 | 9 | ; source: environment 10 | output_prefix = "sapo" 11 | 12 | ; source: defaults 13 | min_pseudogene_coverage = "80.0" 14 | 15 | ; source: defaults 16 | min_seq_gap_length = "20" 17 | 18 | ; source: defaults 19 | alignment_module = "exonerate" 20 | 21 | ; source: defaults 22 | min_exon_size = "30" 23 | 24 | ; source: defaults 25 | StartCodons = "[ATG]" 26 | 27 | ; source: defaults 28 | mature_pep_minsimilarity = "40.0" 29 | 30 | ; source: environment 31 | verbose = "false" 32 | 33 | ; source: git/VIGOR_DB/Reference_DBs/sapo_db.ini 34 | stop_score_factor = "1.0" 35 | 36 | ; source: defaults 37 | reference_database_path = "git/VIGOR_DB/Reference_DBs" 38 | 39 | ; source: defaults 40 | min_pseudogene_identity = "70.0" 41 | 42 | ; source: git/VIGOR_DB/Reference_DBs/sapo_db.ini 43 | leakystop_score_factor = "1.0" 44 | 45 | ; source: git/VIGOR_DB/Reference_DBs/sapo_db.ini 46 | alignment_score_factor = "1.0" 47 | 48 | ; source: defaults 49 | overwrite_output_files = "true" 50 | 51 | ; source: defaults 52 | temporary_directory = "output" 53 | 54 | ; source: defaults 55 | AAOverlap_offset = "10" 56 | 57 | ; source: git/VIGOR_DB/Reference_DBs/sapo_db.ini 58 | reference_database_file = "git/VIGOR_DB/Reference_DBs/sapo_db" 59 | 60 | ; source: git/VIGOR_DB/Reference_DBs/sapo_db.ini 61 | max_gene_overlap = "50" 62 | 63 | ; source: git/VIGOR_DB/Reference_DBs/sapo_db.ini 64 | start_score_factor = "1.0" 65 | 66 | ; source: defaults 67 | max_align_merge_aa_gap = "10" 68 | 69 | ; source: defaults 70 | mature_pep_mincoverage = "50.0" 71 | 72 | ; source: defaults 73 | stop_codon_search_window = "50" 74 | 75 | ; source: defaults 76 | leakystop_notFound_score = "80.0" 77 | 78 | ; source: defaults 79 | max_intron_size = "2500" 80 | 81 | ; source: environment 82 | output_directory = "output/sapo" 83 | 84 | ; source: git/VIGOR_DB/Reference_DBs/sapo_db.ini 85 | splicing_score_factor = "1.0" 86 | 87 | ; source: defaults 88 | min_pseudogene_similarity = "80.0" 89 | 90 | ; source: defaults 91 | mature_pep_minidentity = "25.0" 92 | 93 | ; source: defaults 94 | exonerate_path = "/usr/bin/exonerate" 95 | 96 | ; source: defaults 97 | NTOverlap_offset = "30" 98 | 99 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/veev/vigor-20181004-122424.ini: -------------------------------------------------------------------------------- 1 | ; Effective configuration 20181004-122424 2 | 3 | ; source: defaults 4 | start_codon_search_window = "50" 5 | 6 | ; source: defaults 7 | min_missing_AA_size = "10" 8 | 9 | ; source: environment 10 | output_prefix = "veev" 11 | 12 | ; source: defaults 13 | min_pseudogene_coverage = "80.0" 14 | 15 | ; source: defaults 16 | min_seq_gap_length = "20" 17 | 18 | ; source: defaults 19 | alignment_module = "exonerate" 20 | 21 | ; source: defaults 22 | min_exon_size = "30" 23 | 24 | ; source: defaults 25 | StartCodons = "[ATG]" 26 | 27 | ; source: defaults 28 | mature_pep_minsimilarity = "40.0" 29 | 30 | ; source: environment 31 | verbose = "false" 32 | 33 | ; source: git/VIGOR_DB/Reference_DBs/veev_db.ini 34 | stop_score_factor = "1.0" 35 | 36 | ; source: defaults 37 | reference_database_path = "git/VIGOR_DB/Reference_DBs" 38 | 39 | ; source: defaults 40 | min_pseudogene_identity = "70.0" 41 | 42 | ; source: git/VIGOR_DB/Reference_DBs/veev_db.ini 43 | leakystop_score_factor = "1.0" 44 | 45 | ; source: git/VIGOR_DB/Reference_DBs/veev_db.ini 46 | alignment_score_factor = "1.0" 47 | 48 | ; source: defaults 49 | overwrite_output_files = "true" 50 | 51 | ; source: defaults 52 | temporary_directory = "output" 53 | 54 | ; source: defaults 55 | AAOverlap_offset = "10" 56 | 57 | ; source: git/VIGOR_DB/Reference_DBs/veev_db.ini 58 | reference_database_file = "git/VIGOR_DB/Reference_DBs/veev_db" 59 | 60 | ; source: git/VIGOR_DB/Reference_DBs/veev_db.ini 61 | max_gene_overlap = "50" 62 | 63 | ; source: git/VIGOR_DB/Reference_DBs/veev_db.ini 64 | start_score_factor = "1.0" 65 | 66 | ; source: defaults 67 | max_align_merge_aa_gap = "10" 68 | 69 | ; source: defaults 70 | mature_pep_mincoverage = "50.0" 71 | 72 | ; source: defaults 73 | stop_codon_search_window = "50" 74 | 75 | ; source: defaults 76 | leakystop_notFound_score = "80.0" 77 | 78 | ; source: defaults 79 | max_intron_size = "2500" 80 | 81 | ; source: environment 82 | output_directory = "output/veev" 83 | 84 | ; source: git/VIGOR_DB/Reference_DBs/veev_db.ini 85 | splicing_score_factor = "1.0" 86 | 87 | ; source: defaults 88 | min_pseudogene_similarity = "80.0" 89 | 90 | ; source: defaults 91 | mature_pep_minidentity = "25.0" 92 | 93 | ; source: defaults 94 | exonerate_path = "/usr/bin/exonerate" 95 | 96 | ; source: defaults 97 | NTOverlap_offset = "30" 98 | 99 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/wnvI/vigor-20181008-140220.ini: -------------------------------------------------------------------------------- 1 | ; Effective configuration 20181008-140220 2 | 3 | ; source: defaults 4 | start_codon_search_window = "50" 5 | 6 | ; source: defaults 7 | min_missing_AA_size = "10" 8 | 9 | ; source: environment 10 | output_prefix = "wnvI" 11 | 12 | ; source: defaults 13 | min_pseudogene_coverage = "80.0" 14 | 15 | ; source: defaults 16 | min_seq_gap_length = "20" 17 | 18 | ; source: defaults 19 | alignment_module = "exonerate" 20 | 21 | ; source: defaults 22 | min_exon_size = "30" 23 | 24 | ; source: defaults 25 | StartCodons = "[ATG]" 26 | 27 | ; source: defaults 28 | mature_pep_minsimilarity = "40.0" 29 | 30 | ; source: environment 31 | verbose = "false" 32 | 33 | ; source: git/VIGOR_DB/Reference_DBs/wnvI_db.ini 34 | stop_score_factor = "1.0" 35 | 36 | ; source: defaults 37 | reference_database_path = "git/VIGOR_DB/Reference_DBs" 38 | 39 | ; source: git/VIGOR_DB/Reference_DBs/wnvI_db.ini 40 | min_pseudogene_identity = "75.0" 41 | 42 | ; source: git/VIGOR_DB/Reference_DBs/wnvI_db.ini 43 | leakystop_score_factor = "1.0" 44 | 45 | ; source: git/VIGOR_DB/Reference_DBs/wnvI_db.ini 46 | alignment_score_factor = "1.0" 47 | 48 | ; source: defaults 49 | overwrite_output_files = "true" 50 | 51 | ; source: defaults 52 | temporary_directory = "output" 53 | 54 | ; source: defaults 55 | AAOverlap_offset = "10" 56 | 57 | ; source: git/VIGOR_DB/Reference_DBs/wnvI_db.ini 58 | reference_database_file = "git/VIGOR_DB/Reference_DBs/wnvI_db" 59 | 60 | ; source: git/VIGOR_DB/Reference_DBs/wnvI_db.ini 61 | max_gene_overlap = "50" 62 | 63 | ; source: git/VIGOR_DB/Reference_DBs/wnvI_db.ini 64 | start_score_factor = "1.0" 65 | 66 | ; source: defaults 67 | max_align_merge_aa_gap = "10" 68 | 69 | ; source: defaults 70 | mature_pep_mincoverage = "50.0" 71 | 72 | ; source: git/VIGOR_DB/Reference_DBs/wnvI_db.ini 73 | min_candidate_pctsimilarity = "70.0" 74 | 75 | ; source: defaults 76 | stop_codon_search_window = "50" 77 | 78 | ; source: defaults 79 | leakystop_notFound_score = "80.0" 80 | 81 | ; source: defaults 82 | max_intron_size = "2500" 83 | 84 | ; source: environment 85 | output_directory = "output/wnvI" 86 | 87 | ; source: git/VIGOR_DB/Reference_DBs/wnvI_db.ini 88 | splicing_score_factor = "1.0" 89 | 90 | ; source: git/VIGOR_DB/Reference_DBs/wnvI_db.ini 91 | min_pseudogene_similarity = "80.0" 92 | 93 | ; source: defaults 94 | mature_pep_minidentity = "25.0" 95 | 96 | ; source: defaults 97 | exonerate_path = "/usr/bin/exonerate" 98 | 99 | ; source: defaults 100 | NTOverlap_offset = "30" 101 | 102 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/wnvII/vigor-20181008-141233.ini: -------------------------------------------------------------------------------- 1 | ; Effective configuration 20181008-141233 2 | 3 | ; source: defaults 4 | start_codon_search_window = "50" 5 | 6 | ; source: defaults 7 | min_missing_AA_size = "10" 8 | 9 | ; source: environment 10 | output_prefix = "wnvII" 11 | 12 | ; source: defaults 13 | min_pseudogene_coverage = "80.0" 14 | 15 | ; source: defaults 16 | min_seq_gap_length = "20" 17 | 18 | ; source: defaults 19 | alignment_module = "exonerate" 20 | 21 | ; source: defaults 22 | min_exon_size = "30" 23 | 24 | ; source: defaults 25 | StartCodons = "[ATG]" 26 | 27 | ; source: defaults 28 | mature_pep_minsimilarity = "40.0" 29 | 30 | ; source: environment 31 | verbose = "false" 32 | 33 | ; source: git/VIGOR_DB/Reference_DBs/wnvII_db.ini 34 | stop_score_factor = "1.0" 35 | 36 | ; source: defaults 37 | reference_database_path = "git/VIGOR_DB/Reference_DBs" 38 | 39 | ; source: git/VIGOR_DB/Reference_DBs/wnvII_db.ini 40 | min_pseudogene_identity = "75.0" 41 | 42 | ; source: git/VIGOR_DB/Reference_DBs/wnvII_db.ini 43 | leakystop_score_factor = "1.0" 44 | 45 | ; source: git/VIGOR_DB/Reference_DBs/wnvII_db.ini 46 | alignment_score_factor = "1.0" 47 | 48 | ; source: defaults 49 | overwrite_output_files = "true" 50 | 51 | ; source: defaults 52 | temporary_directory = "output" 53 | 54 | ; source: defaults 55 | AAOverlap_offset = "10" 56 | 57 | ; source: git/VIGOR_DB/Reference_DBs/wnvII_db.ini 58 | reference_database_file = "git/VIGOR_DB/Reference_DBs/wnvII_db" 59 | 60 | ; source: git/VIGOR_DB/Reference_DBs/wnvII_db.ini 61 | max_gene_overlap = "50" 62 | 63 | ; source: git/VIGOR_DB/Reference_DBs/wnvII_db.ini 64 | start_score_factor = "1.0" 65 | 66 | ; source: defaults 67 | max_align_merge_aa_gap = "10" 68 | 69 | ; source: defaults 70 | mature_pep_mincoverage = "50.0" 71 | 72 | ; source: git/VIGOR_DB/Reference_DBs/wnvII_db.ini 73 | min_candidate_pctsimilarity = "70.0" 74 | 75 | ; source: defaults 76 | stop_codon_search_window = "50" 77 | 78 | ; source: defaults 79 | leakystop_notFound_score = "80.0" 80 | 81 | ; source: defaults 82 | max_intron_size = "2500" 83 | 84 | ; source: environment 85 | output_directory = "output/wnvII" 86 | 87 | ; source: git/VIGOR_DB/Reference_DBs/wnvII_db.ini 88 | splicing_score_factor = "1.0" 89 | 90 | ; source: git/VIGOR_DB/Reference_DBs/wnvII_db.ini 91 | min_pseudogene_similarity = "80.0" 92 | 93 | ; source: defaults 94 | mature_pep_minidentity = "25.0" 95 | 96 | ; source: defaults 97 | exonerate_path = "/usr/bin/exonerate" 98 | 99 | ; source: defaults 100 | NTOverlap_offset = "30" 101 | 102 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/wnvII/wnvII.gff3: -------------------------------------------------------------------------------- 1 | ##gff-version 3 2 | AY688948.1 vigor gene 97 3683 . + 0 ID=AY688948.1.1;Name=GP2; 3 | AY688948.1 vigor mRNA 97 3683 . + 0 ID=AY688948.1.1.1;Parent=AY688948.1.1; 4 | AY688948.1 vigor exon 97 3552 . + 0 ID=AY688948.1.1.1.1;Parent=AY688948.1.1.1; 5 | AY688948.1 vigor exon 3552 3683 . + 0 ID=AY688948.1.1.1.2;Parent=AY688948.1.1.1; 6 | AY688948.1 vigor CDS 97 3683 . + 0 ID=AY688948.1.1.1.3;Parent=AY688948.1.1; 7 | AY688948.1 vigor mRNA_with_minus_1_frameshift 3553 3553 . + . ID=AY688948.1.1.1.4;Parent=AY688948.1.1.1; 8 | AY688948.1 vigor gene 97 10401 . + 0 ID=AY688948.1.2;Name=GP1; 9 | AY688948.1 vigor mRNA 97 10401 . + 0 ID=AY688948.1.2.1;Parent=AY688948.1.2; 10 | AY688948.1 vigor exon 97 10401 . + 0 ID=AY688948.1.2.1.1;Parent=AY688948.1.2.1; 11 | AY688948.1 vigor CDS 97 10401 . + 0 ID=AY688948.1.2.1.2;Parent=AY688948.1.2; 12 | NC_001563.2 vigor pseudogene 97 3671 . + 0 ID=NC_001563.2.1;Name=GP2; 13 | NC_001563.2 vigor mRNA 97 3671 . + 0 ID=NC_001563.2.1.1;Parent=NC_001563.2.1; 14 | NC_001563.2 vigor exon 97 3543 . + 0 ID=NC_001563.2.1.1.1;Parent=NC_001563.2.1.1; 15 | NC_001563.2 vigor exon 3546 3671 . + 0 ID=NC_001563.2.1.1.2;Parent=NC_001563.2.1.1; 16 | NC_001563.2 vigor CDS 97 3671 . + 0 ID=NC_001563.2.1.1.3;Parent=NC_001563.2.1; 17 | NC_001563.2 vigor gene 97 10389 . + 0 ID=NC_001563.2.2;Name=GP1; 18 | NC_001563.2 vigor mRNA 97 10389 . + 0 ID=NC_001563.2.2.1;Parent=NC_001563.2.2; 19 | NC_001563.2 vigor exon 97 10389 . + 0 ID=NC_001563.2.2.1.1;Parent=NC_001563.2.2.1; 20 | NC_001563.2 vigor CDS 97 10389 . + 0 ID=NC_001563.2.2.1.2;Parent=NC_001563.2.2; 21 | HM147823.1 vigor gene 97 3683 . + 0 ID=HM147823.1.1;Name=GP2; 22 | HM147823.1 vigor mRNA 97 3683 . + 0 ID=HM147823.1.1.1;Parent=HM147823.1.1; 23 | HM147823.1 vigor exon 97 3552 . + 0 ID=HM147823.1.1.1.1;Parent=HM147823.1.1.1; 24 | HM147823.1 vigor exon 3552 3683 . + 0 ID=HM147823.1.1.1.2;Parent=HM147823.1.1.1; 25 | HM147823.1 vigor CDS 97 3683 . + 0 ID=HM147823.1.1.1.3;Parent=HM147823.1.1; 26 | HM147823.1 vigor mRNA_with_minus_1_frameshift 3553 3553 . + . ID=HM147823.1.1.1.4;Parent=HM147823.1.1.1; 27 | HM147823.1 vigor gene 97 10401 . + 0 ID=HM147823.1.2;Name=GP1; 28 | HM147823.1 vigor mRNA 97 10401 . + 0 ID=HM147823.1.2.1;Parent=HM147823.1.2; 29 | HM147823.1 vigor exon 97 10401 . + 0 ID=HM147823.1.2.1.1;Parent=HM147823.1.2.1; 30 | HM147823.1 vigor CDS 97 10401 . + 0 ID=HM147823.1.2.1.2;Parent=HM147823.1.2; 31 | HM147824.1 vigor gene 97 3683 . + 0 ID=HM147824.1.1;Name=GP2; 32 | HM147824.1 vigor mRNA 97 3683 . + 0 ID=HM147824.1.1.1;Parent=HM147824.1.1; 33 | HM147824.1 vigor exon 97 3552 . + 0 ID=HM147824.1.1.1.1;Parent=HM147824.1.1.1; 34 | HM147824.1 vigor exon 3552 3683 . + 0 ID=HM147824.1.1.1.2;Parent=HM147824.1.1.1; 35 | HM147824.1 vigor CDS 97 3683 . + 0 ID=HM147824.1.1.1.3;Parent=HM147824.1.1; 36 | HM147824.1 vigor mRNA_with_minus_1_frameshift 3553 3553 . + . ID=HM147824.1.1.1.4;Parent=HM147824.1.1.1; 37 | HM147824.1 vigor gene 97 10401 . + 0 ID=HM147824.1.2;Name=GP1; 38 | HM147824.1 vigor mRNA 97 10401 . + 0 ID=HM147824.1.2.1;Parent=HM147824.1.2; 39 | HM147824.1 vigor exon 97 10401 . + 0 ID=HM147824.1.2.1.1;Parent=HM147824.1.2.1; 40 | HM147824.1 vigor CDS 97 10401 . + 0 ID=HM147824.1.2.1.2;Parent=HM147824.1.2; 41 | KP109691.1 vigor gene 87 3673 . + 0 ID=KP109691.1.1;Name=GP2; 42 | KP109691.1 vigor mRNA 87 3673 . + 0 ID=KP109691.1.1.1;Parent=KP109691.1.1; 43 | KP109691.1 vigor exon 87 3542 . + 0 ID=KP109691.1.1.1.1;Parent=KP109691.1.1.1; 44 | KP109691.1 vigor exon 3542 3673 . + 0 ID=KP109691.1.1.1.2;Parent=KP109691.1.1.1; 45 | KP109691.1 vigor CDS 87 3673 . + 0 ID=KP109691.1.1.1.3;Parent=KP109691.1.1; 46 | KP109691.1 vigor mRNA_with_minus_1_frameshift 3543 3543 . + . ID=KP109691.1.1.1.4;Parent=KP109691.1.1.1; 47 | KP109691.1 vigor gene 87 10391 . + 0 ID=KP109691.1.2;Name=GP1; 48 | KP109691.1 vigor mRNA 87 10391 . + 0 ID=KP109691.1.2.1;Parent=KP109691.1.2; 49 | KP109691.1 vigor exon 87 10391 . + 0 ID=KP109691.1.2.1.1;Parent=KP109691.1.2.1; 50 | KP109691.1 vigor CDS 87 10391 . + 0 ID=KP109691.1.2.1.2;Parent=KP109691.1.2; 51 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/zikv/vigor-20181008-142127.ini: -------------------------------------------------------------------------------- 1 | ; Effective configuration 20181008-142127 2 | 3 | ; source: defaults 4 | start_codon_search_window = "50" 5 | 6 | ; source: defaults 7 | min_missing_AA_size = "10" 8 | 9 | ; source: environment 10 | output_prefix = "zikv" 11 | 12 | ; source: defaults 13 | min_pseudogene_coverage = "80.0" 14 | 15 | ; source: defaults 16 | min_seq_gap_length = "20" 17 | 18 | ; source: defaults 19 | alignment_module = "exonerate" 20 | 21 | ; source: defaults 22 | min_exon_size = "30" 23 | 24 | ; source: defaults 25 | StartCodons = "[ATG]" 26 | 27 | ; source: defaults 28 | mature_pep_minsimilarity = "40.0" 29 | 30 | ; source: environment 31 | verbose = "false" 32 | 33 | ; source: git/VIGOR_DB/Reference_DBs/zikv_db.ini 34 | stop_score_factor = "1.0" 35 | 36 | ; source: defaults 37 | reference_database_path = "git/VIGOR_DB/Reference_DBs" 38 | 39 | ; source: git/VIGOR_DB/Reference_DBs/zikv_db.ini 40 | min_pseudogene_identity = "75.0" 41 | 42 | ; source: git/VIGOR_DB/Reference_DBs/zikv_db.ini 43 | leakystop_score_factor = "1.0" 44 | 45 | ; source: git/VIGOR_DB/Reference_DBs/zikv_db.ini 46 | alignment_score_factor = "1.0" 47 | 48 | ; source: defaults 49 | overwrite_output_files = "true" 50 | 51 | ; source: defaults 52 | temporary_directory = "output" 53 | 54 | ; source: defaults 55 | AAOverlap_offset = "10" 56 | 57 | ; source: git/VIGOR_DB/Reference_DBs/zikv_db.ini 58 | reference_database_file = "git/VIGOR_DB/Reference_DBs/zikv_db" 59 | 60 | ; source: git/VIGOR_DB/Reference_DBs/zikv_db.ini 61 | max_gene_overlap = "50" 62 | 63 | ; source: git/VIGOR_DB/Reference_DBs/zikv_db.ini 64 | start_score_factor = "1.0" 65 | 66 | ; source: defaults 67 | max_align_merge_aa_gap = "10" 68 | 69 | ; source: defaults 70 | mature_pep_mincoverage = "50.0" 71 | 72 | ; source: git/VIGOR_DB/Reference_DBs/zikv_db.ini 73 | min_candidate_pctsimilarity = "70.0" 74 | 75 | ; source: defaults 76 | stop_codon_search_window = "50" 77 | 78 | ; source: defaults 79 | leakystop_notFound_score = "80.0" 80 | 81 | ; source: defaults 82 | max_intron_size = "2500" 83 | 84 | ; source: environment 85 | output_directory = "output/zikv" 86 | 87 | ; source: git/VIGOR_DB/Reference_DBs/zikv_db.ini 88 | splicing_score_factor = "1.0" 89 | 90 | ; source: git/VIGOR_DB/Reference_DBs/zikv_db.ini 91 | min_pseudogene_similarity = "80.0" 92 | 93 | ; source: defaults 94 | mature_pep_minidentity = "25.0" 95 | 96 | ; source: defaults 97 | exonerate_path = "/usr/bin/exonerate" 98 | 99 | ; source: defaults 100 | NTOverlap_offset = "30" 101 | 102 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/zikv/zikv.gff3: -------------------------------------------------------------------------------- 1 | ##gff-version 3 2 | KX893855.1 vigor gene 108 10379 . + 0 ID=KX893855.1.1;Name=GP1; 3 | KX893855.1 vigor mRNA 108 10379 . + 0 ID=KX893855.1.1.1;Parent=KX893855.1.1; 4 | KX893855.1 vigor exon 108 10379 . + 0 ID=KX893855.1.1.1.1;Parent=KX893855.1.1.1; 5 | KX893855.1 vigor CDS 108 10379 . + 0 ID=KX893855.1.1.1.2;Parent=KX893855.1.1; 6 | KU955594.1 vigor gene 107 10366 . + 0 ID=KU955594.1.1;Name=GP1; 7 | KU955594.1 vigor mRNA 107 10366 . + 0 ID=KU955594.1.1.1;Parent=KU955594.1.1; 8 | KU955594.1 vigor exon 107 10366 . + 0 ID=KU955594.1.1.1.1;Parent=KU955594.1.1.1; 9 | KU955594.1 vigor CDS 107 10366 . + 0 ID=KU955594.1.1.1.2;Parent=KU955594.1.1; 10 | -------------------------------------------------------------------------------- /src/test/resources/vigor4ReferenceOutput/zikv/zikv.tbl: -------------------------------------------------------------------------------- 1 | >Features KX893855.1 2 | 108 10379 gene 3 | gene GP1 4 | 108 10379 CDS 5 | codon_start 1 6 | protein_id KX893855.1.1 7 | gene GP1 8 | product genome polyprotein 9 | >Features KX893855.1.1 10 | 123 215 mat_peptide 11 | product protein pr 12 | gene GP1 13 | 216 290 mat_peptide 14 | product small envelope protein M 15 | gene GP1 16 | 291 794 mat_peptide 17 | product envelope protein E 18 | gene GP1 19 | 795 1146 mat_peptide 20 | product nonstructural protein NS1 21 | gene GP1 22 | 1147 1372 mat_peptide 23 | product nonstructural protein NS2A 24 | gene GP1 25 | 1373 1502 mat_peptide 26 | product nonstructural protein NS2B 27 | gene GP1 28 | 1503 2119 mat_peptide 29 | product nonstructural protein NS3 30 | gene GP1 31 | 2120 2246 mat_peptide 32 | product nonstructural protein NS4A 33 | gene GP1 34 | 2247 2269 mat_peptide 35 | product protein 2K 36 | gene GP1 37 | 2270 2520 mat_peptide 38 | product nonstructural protein NS4B 39 | gene GP1 40 | 2521 3423 mat_peptide 41 | product RNA-dependent RNA polymerase NS5 42 | gene GP1 43 | >Features KU955594.1 44 | 107 10366 gene 45 | gene GP1 46 | 107 10366 CDS 47 | codon_start 1 48 | protein_id KU955594.1.1 49 | gene GP1 50 | product genome polyprotein 51 | >Features KU955594.1.1 52 | 123 215 mat_peptide 53 | product protein pr 54 | gene GP1 55 | 216 290 mat_peptide 56 | product small envelope protein M 57 | gene GP1 58 | 291 790 mat_peptide 59 | product envelope protein E 60 | gene GP1 61 | 791 1142 mat_peptide 62 | product nonstructural protein NS1 63 | gene GP1 64 | 1143 1368 mat_peptide 65 | product nonstructural protein NS2A 66 | gene GP1 67 | 1369 1498 mat_peptide 68 | product nonstructural protein NS2B 69 | gene GP1 70 | 1499 2115 mat_peptide 71 | product nonstructural protein NS3 72 | gene GP1 73 | 2116 2242 mat_peptide 74 | product nonstructural protein NS4A 75 | gene GP1 76 | 2243 2265 mat_peptide 77 | product protein 2K 78 | gene GP1 79 | 2266 2516 mat_peptide 80 | product nonstructural protein NS4B 81 | gene GP1 82 | 2517 3419 mat_peptide 83 | product RNA-dependent RNA polymerase NS5 84 | gene GP1 85 | -------------------------------------------------------------------------------- /src/test/resources/vigorUnitTestInput/Flua_RiboSlippage_Test.fasta: -------------------------------------------------------------------------------- 1 | >gi|260907760|gb|GU060481.1| Influenza A Virus (A/goose/Czech Republic/1848-K9/2009(H7N9)) segment 3 polymerase PA (PA) gene, complete cds 2 | TGATCCAAAATGGAAGATTTTGTGCGACAATGCTTCAATCCAATGATTGTCGAGCTTGCGGAAAAGGCAA 3 | TGAAAGAATATGGGGAAGATCCGAAAATCGAAACGAACAAATTTGCCGCAATATGCACACACTTAGAGGT 4 | CTGTTTCATGTATTCGGATTTCCACTTTATTGATGAACGGGGCGAATCAATAATTGTAGAATCTGGCGAT 5 | CCAAATGCATTATTGAAACACCGATTTGAGATAATTGAAGGGAGAGACCGAACGATGGCCTGGACAGTGG 6 | TGAATAGTATCTGCAACACCACAGGAGTCGAGAAACCTAAATTTCTCCCAGATTTGTATGACTACAAAGA 7 | GAATCGATTCATTGAAATTGGAGTAACACGGAGGGAAGTTCATATATACTATCTAGAAAAGGCCAACAAG 8 | ATAAAATCAGAGAAGACACACATTCACATATTCTCATTCACTGGAGAGGAAATGGCCACCAAAGCGGACT 9 | ACACTCTTGACGAAGAGAGTAGGGCAAGAATCAAAACCAGGCTGTTCACTATAAGGCAGGAAATGGCCAG 10 | TAGGGGTCTATGGGATTCCTTTCGTCAGTCCGAGAGAGGCGAAGAGACAGTTGAAGAAAGATTTGAAATC 11 | ACAGGAACCATGCGCAGGCTTGCCGACCAAAGTCTCCCACCGAACTTCTCCAGCCTTGAAAACTTTAGAG 12 | CCTATGTGGATGGATTCGAACCGAACGGCTGCATTGAGGGCAAGCTTTCTCAAATGTCAAAAGAAGTGAA 13 | CGCCCGAATTGAGCCATTTCTGAAGACAACACCACGCCCTCTCAAACTACCTGACGGGCCTCCCTGCTCT 14 | CAACGGTCGAAGTTCCTGCTGATGGATGCCCTTAAATTAAGCATCGAAGACCCGAGTCATGAGGGGGAGG 15 | GTATACCGCTATATGATGCAATCAAATGCATGAAGACATTTTTCGGCTGGAAAGAGCCCAACATTGTAAA 16 | ACCACATGAAAAGGGCATAAACCCCAATTACCTCCTGGCTTGGAAGCAAGTGCTGGCAGAACTCCAAGAT 17 | ATTGAAAATGAGGAGAAAATCCCAAAAACAAAGAACATGAAGAAAACGAGCCAGTTGAAGTGGGCACTTG 18 | GTGAGAATATGGCACCGGAGAAGGTAGACTTTGAGGATTGCAAGGATGTTAGCGATCTGAGACAGTATGA 19 | CAGTGATGAACCAGAGTCTAGATCGCTAGCAAGCTGGATCCAGAGTGAATTCAACAAGGCATGTGAATTG 20 | ACAGATTCAAGTTGGATTGAGCTTGATGAAATAGGGGAAGACATTGCTCCAATTGAGCACATTGCGAGTA 21 | TGAGAAGAAACTACTTCACAGCGGAAGTATCCCATTGCAGGGCTACTGAATACATAATGAAAGGAGTGTA 22 | CATAAACACAGCCTTGTTGAATGCATCCTGTGCAGCCATGGATGACTTCCAACTGATTCCAATGATAAGC 23 | AAATGCAGGACCAAAGAAGGGAGGCGGAAGACTAATCTGTATGGATTCATTATAAAAGGAAGATCCCATT 24 | TGAGAAATGACACCGATGTAGTAAACTTTGTGAGCATGGAATTCTCTCTTACTGACCCGAGGCTGGAGCC 25 | ACACAAGTGGGAAAAGTACTGTGTTCTCGAGATAGGAGACATGCTCCTACGGACTGCAATAGGCCAAGTG 26 | TCAAGGCCCATGTTCCTGTATGTGAGAACCAATGGGACTTCCAAGATCAAGATGAAGTGGGGCATGGAAA 27 | TGAGGCGATGCCTTCTTCAATCCCTTCAACAAATTGAGAGCATGATTGAAGCCGAGTCTTCTGTCAAAGA 28 | GAAGGACATGACCAAAGAATTCTTTGAAAACAAATCAGAAACATGGCCAATTGGAGAGTCACCCAAAGGG 29 | GTGGAGGAAGGCTCCATTGGGAAGGTGTGCAGAACCTTACTGGCAAAATCTGTATTCAACAGCCTATATG 30 | CATCTCCACAACTCGAGGGATTTTCAGCTGAATCAAGAAAGTTGCTTCTCATTGTCCAGGCACTTAGGGA 31 | CAACCTGGAACCTGGGACCTTCGATCTTGGGGGGCTATATGAAGCAATTGAGGAGTGCCTGATTAATGAT 32 | CCCTGGGTTTTGCTTAATGCGTCTTGGTTCAACTCCTTCCTCACACATGCACTGAAATAGTTGTGGCAAT 33 | GCTACTATTTGCTATCCATACTGTCCAAAA 34 | -------------------------------------------------------------------------------- /src/test/resources/vigorUnitTestInput/Flua_RiboSlippage_Test.txt: -------------------------------------------------------------------------------- 1 | Command line: [exonerate --model protein2genome -q /home/snettem/flua_sam_db -t /home/snettem/git/VIGOR4/src/test/resources/vigorUnitTestInput/Flua_RiboSlippage_Test.fasta] 2 | Hostname: [snettem-VirtualBox] 3 | 4 | C4 Alignment: 5 | ------------ 6 | Query: seg3prot2A gene="PA-X" shared_cds="PA" product="PA-X protein" splice_form="e573i1e183" ribosomal_slippage=Y slippage_motif="[NC]{2}[NT]{3}[NCT]" slippage_offset=1 slippage_frameshift=1 db="flua_db" V4_Ribosomal_Slippage="-4/+1/[BCDHKMNSTVWY][BDGKNRSV][BCDGHKMNRSTVWY][ABCDGHKMNRSVWY][ABCDGHKMNRSTVWY][ABCDGHKMNRSTVWY][ABCDGHKMNRSTVWY][ABCDHKMNRSTVWY][ABCDGHKMNRSTVWY][BCDGHKMNRSTVWY][BDHKNTWY][BCDHKMNSTVWY][ABCDHKMNRSTVWY][ABCDGHKMNRSTVWY][BCDGHKMNRSTVWY][ABCDHKMNRSTVWY][ABDGHKMNRSTVWY][ABDGHKMNRSTVWY][BCDGHKMNRSTVWY][BCDHKMNSTVWY][ABCDHKMNRSTVWY][BDGKNRSV]" length=252 7 | Target: gi|260907760|gb|GU060481.1| Influenza A Virus (A/goose/Czech Republic/1848-K9/2009(H7N9)) segment 3 polymerase PA (PA) gene, complete cds 8 | Model: protein2genome:local 9 | Raw score: 1205 10 | Query range: 0 -> 252 11 | Target range: 9 -> 766 12 | 13 | 1 : MetGluAspPheValArgGlnCysPheAsnProMetIleValGluLeuAlaGluLysThrMetL : 22 14 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||.!!|||| 15 | MetGluAspPheValArgGlnCysPheAsnProMetIleValGluLeuAlaGluLysAlaMetL 16 | 10 : ATGGAAGATTTTGTGCGACAATGCTTCAATCCAATGATTGTCGAGCTTGCGGAAAAGGCAATGA : 73 17 | 18 | 23 : ysGluTyrGlyGluAspLeuLysIleGluThrAsnLysPheAlaAlaIleCysThrHisLeuGl : 43 19 | |||||||||||||||||! !|||||||||||||||||||||||||||||||||||||||||||| 20 | ysGluTyrGlyGluAspProLysIleGluThrAsnLysPheAlaAlaIleCysThrHisLeuGl 21 | 74 : AAGAATATGGGGAAGATCCGAAAATCGAAACGAACAAATTTGCCGCAATATGCACACACTTAGA : 136 22 | 23 | 44 : uValCysPheMetTyrSerAspPheHisPheIleAsnGluGlnGlyGluSerIleIleValGlu : 64 24 | ||||||||||||||||||||||||||||||||||:!!|||!:!||||||||||||||||||||| 25 | uValCysPheMetTyrSerAspPheHisPheIleAspGluArgGlyGluSerIleIleValGlu 26 | 137 : GGTCTGTTTCATGTATTCGGATTTCCACTTTATTGATGAACGGGGCGAATCAATAATTGTAGAA : 199 27 | 28 | 65 : LeuGlyAspProAsnAlaLeuLeuLysHisArgPheGluIleIleGluGlyArgAspArgThrM : 86 29 | ! !||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 30 | SerGlyAspProAsnAlaLeuLeuLysHisArgPheGluIleIleGluGlyArgAspArgThrM 31 | 200 : TCTGGCGATCCAAATGCATTATTGAAACACCGATTTGAGATAATTGAAGGGAGAGACCGAACGA : 265 32 | 33 | 87 : etAlaTrpThrValValAsnSerIleCysAsnThrThrGlyAlaGluLysProLysPheLeuPr : 107 34 | |||||||||||||||||||||||||||||||||||||||||!.!|||||||||||||||||||| 35 | etAlaTrpThrValValAsnSerIleCysAsnThrThrGlyValGluLysProLysPheLeuPr 36 | 266 : TGGCCTGGACAGTGGTGAATAGTATCTGCAACACCACAGGAGTCGAGAAACCTAAATTTCTCCC : 328 37 | 38 | 108 : oAspLeuTyrAspTyrLysGluAsnArgPheIleGluIleGlyValThrArgArgGluValHis : 128 39 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 40 | oAspLeuTyrAspTyrLysGluAsnArgPheIleGluIleGlyValThrArgArgGluValHis 41 | 329 : AGATTTGTATGACTACAAAGAGAATCGATTCATTGAAATTGGAGTAACACGGAGGGAAGTTCAT : 391 42 | 43 | 129 : IleTyrTyrLeuGluLysAlaAsnLysIleLysSerGluLysThrHisIleHisIlePheSerP : 150 44 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 45 | IleTyrTyrLeuGluLysAlaAsnLysIleLysSerGluLysThrHisIleHisIlePheSerP 46 | 392 : ATATACTATCTAGAAAAGGCCAACAAGATAAAATCAGAGAAGACACACATTCACATATTCTCAT : 457 47 | 48 | 151 : heThrGlyGluGluMetAlaThrLysAlaAspTyrThrLeuAspGluGluSerArgAlaArgIl : 171 49 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 50 | heThrGlyGluGluMetAlaThrLysAlaAspTyrThrLeuAspGluGluSerArgAlaArgIl 51 | 458 : TCACTGGAGAGGAAATGGCCACCAAAGCGGACTACACTCTTGACGAAGAGAGTAGGGCAAGAAT : 520 52 | 53 | 172 : eLysThrArgLeuPheThrIleArgGlnGluMetAlaSerArgGlyLeuTrpAspSer-PheVa : 192 54 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||#||||| 55 | eLysThrArgLeuPheThrIleArgGlnGluMetAlaSerArgGlyLeuTrpAspSer#PheVa 56 | 521 : CAAAACCAGGCTGTTCACTATAAGGCAGGAAATGGCCAGTAGGGGTCTATGGGATTCCTTTCGT : 584 57 | 58 | 193 : lSerProArgGluGluLysArgGlnLeuLysLysGlyLeuLysSerGlnGluGlnCysAlaSer : 213 59 | |||||||||||||! !||||||||||||||||||! !|||||||||||||||! !||||||.!! 60 | lSerProArgGluAlaLysArgGlnLeuLysLysAspLeuLysSerGlnGluProCysAlaGly 61 | 585 : CAGTCCGAGAGAGGCGAAGAGACAGTTGAAGAAAGATTTGAAATCACAGGAACCATGCGCAGGC : 647 62 | 63 | 214 : LeuProThrLysValSerArgArgThrSerProAlaLeuLysIleLeuGluProMetTrpMetA : 235 64 | ||||||||||||||||||!.!|||||||||||||||||||||! !||||||||||||||||||| 65 | LeuProThrLysValSerHisArgThrSerProAlaLeuLysThrLeuGluProMetTrpMetA 66 | 648 : TTGCCGACCAAAGTCTCCCACCGAACTTCTCCAGCCTTGAAAACTTTAGAGCCTATGTGGATGG : 713 67 | 68 | 236 : spSerAsnArgThrAlaThrLeuArgAlaSerCysLeuLysCysProLysLys : 252 69 | |||||||||||||||||.!!||||||||||||! !|||||||||! !|||||| 70 | spSerAsnArgThrAlaAlaLeuArgAlaSerPheLeuLysCysGlnLysLys 71 | 714 : ATTCGAACCGAACGGCTGCATTGAGGGCAAGCTTTCTCAAATGTCAAAAGAAG : 766 72 | 73 | vulgar: seg3prot2A 0 252 . gi|260907760|gb|GU060481.1| 9 766 + 1205 M 190 570 F 0 1 M 62 186 74 | -- completed exonerate analysis 75 | -------------------------------------------------------------------------------- /src/test/resources/vigorUnitTestInput/Flua_SpliceSites_Test.fasta: -------------------------------------------------------------------------------- 1 | >gi|307141877|gb|HQ244419.1| Influenza A Virus (A/goose/Czech Republic/1848-T14/2009(H7N9)) segment 8 nuclear export protein (NEP) and nonstructural protein 1 (NS1) genes, complete cds 2 | ACAAAAACATAATGGATTCCAACACTGTGTCAAGCTTTCAGGTAGACTGCTTTCTTTGGCATGTCCGCAA 3 | ACGATTTGCAGACCAAGAACTGGGTGATGCCCCATTCCTTGACCGGCTTCGCCGAGATCAGAAGTCCCTG 4 | AGAGGAAGAGGCAGCACTCTTGGTCTGGACATCGAGACAGCCACTCGTGCGGGAAAGCAGATAGTGGAGC 5 | GGATTCTGGAGGAGGAATCTGATGAAGCACTTAAAATGACTATTGCTTCAGTGCCAGCTTCACGCTACCT 6 | AACTGACATGACTCTTGAAGAAATGTCAAGGGACTGGTTCATGCTCATGCCCAAACAGAAAGTGGCAGGT 7 | TCCCTTTGCATCAGAATGGACCAGGCAATAATGGATAAAAACATCATATTGAAGGCAAACTTCAGTGTGA 8 | TTTTTGACCGATTGGAAACCCTAATACTGCTTAGAGCTTTCACAGAAGAAGGAGCAATTGTGGGAGAAAT 9 | CTCACCGTTACCTTCTCTTCCAGGACATACTGATGAGGATGTCAAAAATGCAATTGGGGTCCTCATCGGA 10 | GGACTTGAATGGAATGATAACACAGTTCGAGTCTCTGAAACTCTACAGAGATTCGCTTGGAGAAGCAGTA 11 | ATGAGGATGGGAGACCTCCACTCCCTCCAAAGCAGAAACGGAAAATGGCGAGAACAATTGAGTCAGAAGT 12 | TTGAAGAGATAAGATGGCTGATTGAAGAAGTGCGACATCGATTGAAAATTACAGAGAACAGCTTCGAACA 13 | GATTACGTTTATGCAAGCCTTACAACTATTGCTTGAAGTAGAGCAAGAGATAAGAACTTTCTCGTTTCAG 14 | CTTATTTAATGATAA 15 | -------------------------------------------------------------------------------- /src/test/resources/vigorUnitTestInput/Flua_SpliceSites_Test.txt: -------------------------------------------------------------------------------- 1 | Command line: [/usr/bin/exonerate --model protein2genome -q /home/snettem/git/VIGOR4/VigorWorkSpace/db_temp.fasta -t /home/snettem/git/VIGOR4/VigorWorkSpace/sequence_temp.fasta --showcigar true] 2 | Hostname: [snettem-VirtualBox] 3 | 4 | C4 Alignment: 5 | ------------ 6 | Query: seg8prot2A db="flua_db" gene="NEP" shared_cds="NS1" intron_size=450-550 product="nuclear export protein" gene_synonym="NS2" splice_form="e30i471e333" spliced=Y length=121 7 | Target: gi|307141877|gb|HQ244419.1| Influenza A Virus (A/goose/Czech Republic/1848-T14/2009(H7N9)) segment 8 nuclear export protein (NEP) and nonstructural protein 1 (NS1) genes, complete cds 8 | Model: protein2genome:local 9 | Raw score: 558 10 | Query range: 0 -> 121 11 | Target range: 11 -> 846 12 | 13 | 1 : MetAspSerAsnThrValSerSerPheGln >>>> Target Intron 1 >>>> AspIl : 12 14 | |||||||||||||||||||||||||||||| 472 bp ||||| 15 | MetAspSerAsnThrValSerSerPheGln++ ++AspIl 16 | 12 : ATGGATTCCAACACTGTGTCAAGCTTTCAGgt.........................agGACAT : 517 17 | 18 | 13 : eLeuLeuArgMetSerLysMetGlnLeuGlySerSerSerGluGlyLeuAsnGlyMetIleThr : 33 19 | ||||:!!||||||||||||||||||||||||||||||||||||! !|||||||||||||||||| 20 | eLeuMetArgMetSerLysMetGlnLeuGlySerSerSerGluAspLeuAsnGlyMetIleThr 21 | 518 : ACTGATGAGGATGTCAAAAATGCAATTGGGGTCCTCATCGGAGGACTTGAATGGAATGATAACA : 580 22 | 23 | 34 : GlnPheGluSerLeuLysIleTyrArgAspSerLeuGlyGluAlaValMetArgMetGlyAspL : 55 24 | ||||||||||||||||||:!!||||||||||||||||||||||||||||||||||||||||||| 25 | GlnPheGluSerLeuLysLeuTyrArgAspSerLeuGlyGluAlaValMetArgMetGlyAspL 26 | 581 : CAGTTCGAGTCTCTGAAACTCTACAGAGATTCGCTTGGAGAAGCAGTAATGAGGATGGGAGACC : 646 27 | 28 | 56 : euHisLeuLeuGlnAsnArgAsnGlyLysTrpArgGluGlnLeuGlyGlnLysPheGluGluIl : 76 29 | |||||! !||||||!:!|||||||||||||||||||||||||||.!!||||||||||||||||| 30 | euHisSerLeuGlnSerArgAsnGlyLysTrpArgGluGlnLeuSerGlnLysPheGluGluIl 31 | 647 : TCCACTCCCTCCAAAGCAGAAACGGAAAATGGCGAGAACAATTGAGTCAGAAGTTTGAAGAGAT : 709 32 | 33 | 77 : eArgTrpLeuIleGluGluValArgHisArgLeuArgThrThrGluAsnSerPheGluGlnIle : 97 34 | ||||||||||||||||||||||||||||||||||!:!! !|||||||||||||||||||||||| 35 | eArgTrpLeuIleGluGluValArgHisArgLeuLysIleThrGluAsnSerPheGluGlnIle 36 | 710 : AAGATGGCTGATTGAAGAAGTGCGACATCGATTGAAAATTACAGAGAACAGCTTCGAACAGATT : 772 37 | 38 | 98 : ThrPheMetGlnAlaLeuGlnLeuLeuPheGluValGluGlnGluIleArgThrPheSerPheG : 119 39 | |||||||||||||||||||||||||||.!!|||||||||||||||||||||||||||||||||| 40 | ThrPheMetGlnAlaLeuGlnLeuLeuLeuGluValGluGlnGluIleArgThrPheSerPheG 41 | 773 : ACGTTTATGCAAGCCTTACAACTATTGCTTGAAGTAGAGCAAGAGATAAGAACTTTCTCGTTTC : 838 42 | 43 | 120 : lnLeuIle : 121 44 | |||||||| 45 | lnLeuIle 46 | 839 : AGCTTATT : 846 47 | 48 | cigar: seg8prot2A 0 121 . gi|307141877|gb|HQ244419.1| 11 846 + 558 M 30 D 472 M 333 49 | vulgar: seg8prot2A 0 121 . gi|307141877|gb|HQ244419.1| 11 846 + 558 M 10 30 5 0 2 I 0 468 3 0 2 M 111 333 50 | -- completed exonerate analysis 51 | -------------------------------------------------------------------------------- /src/test/resources/vigorUnitTestInput/chikv_ungapped.fasta.firsthalf: -------------------------------------------------------------------------------- 1 | >JF274082.1 Chikungunya virus isolate IND-06-Guj, complete genome 2 | ACACACGTAGCCTACCAGTTTCTTACTGCTCTACTCTGCAAAGCAAGAGATTAATAACCCATCATGGATC 3 | CTGTGTACGTGGACATAGACGCTGACAGCGCCTTTTTGAAGGCCCTGCAACGTGCGTACCCCATGTTTGA 4 | GGTGGAACCAAGGCAGGTCACACCGAATGACCATGCTAATGCTAGAGCGTTCTCGCATCTAGCTATAAAA 5 | CTAATAGAGCAGGAAATTGACCCCGACTCAACCATCCTGGATATCGGCAGTGCGCCAGCAAGGAGGATGA 6 | TGTCGGACAGGAAGTACCACTGCGTCTGCCCGATGCGCAGTGCGGAAGATCCCGAGAGACTCGCTAATTA 7 | TGCGAGAAAGCTAGCATCTGCCGCAGGAAAAGTCCTGGACAGAAACATCTCTGGAAAGATCGGGGACTTA 8 | CAAGCAGTAATGGCCGTGCCAGACAAGGAGACGCCAACATTCTGCTTACACACAGACGTCTCATGTAGAC 9 | AGAGAGCAGACGTCGCTATATACCAAGACGTCTATGCTGTACACGCACCCACGTCGCTATACCACCAGGC 10 | GATTAAAGGGGTCCGAGTGGCGTACTGGGTTGGGTTCGACACAACCCCGTTCATGTACAATGCCATGGCG 11 | GGTGCCTACCCCTCATACTCGACAAACTGGGCAGATGAGCAGGTACTGAAGGCTAAGAACATAGGATTAT 12 | GTTCAACAGACCTGACGGAAGGTAGACGAGGCAAGTTGTCTATTATGAGAGGGAAAAAGCTAAAACCGTG 13 | CGACCGTGTGCTGTTCTCAGTAGGGTCAACGCTCTACCCGGAAAGCCGCAAGCTACTTAAGAGCTGGCAC 14 | CTGCCATCGGTGTTCCATTTAAAGGGCAAACTCAGCTTCACATGCCGCTGTGATACAGTGGTTTCGTGTG 15 | AGGGCTACGTCGTTAAGAGAATAACGATGAGCCCAGGCCTTTATGGAAAAACCACAGGGTATGCGGTAAC 16 | CCACCACGCAGACGGATTCCTGATGTGCAAGACTACCGACACGGTTGACGGCGAAAGAGTGTCATTCTCG 17 | GTGTGCACATACGTGCCGGCGACCATTTGTGATCAAATGACCGGCATCCTTGCTACAGAAGTCACGCCGG 18 | AGGATGCACAGAAGCTGTTGGTGGGGCTGAACCAGAGAATAGTGGTTAACGGCAGAACGCAACGGAATAT 19 | GAACACCATGAAAAATTATCTGCTTCCCGTGGTCGCCCAAGCCTTCAGTAAGTGGGCAAAGGAGTGCCGG 20 | AAAGACATGGAAGATGAAAAACTCCTGGGGGTCAGAGAAAGAACACTGACCTGCTGCTGTCTATGGGCAT 21 | TCAAGAAGCAGAAAACACACACGGTCTACAAGAGGCCTGATACCCAGTCAATTCAGAAGGTTCAGGCCGA 22 | GTTTGACAGCTTTGTGGTACCGAGTCTGTGGTCGTCCGGGTTGTCAATCCCTTTGAGGACTAGAATCAAA 23 | TGGTTGTTAAGCAAGGTGCCAAAAACCGACCTGATCCCATACAGCGGAGACGCCCGAGAAGCCCGGGACG 24 | CAGAAAAAGAAGCAGAGGAAGAACGAGAAGCAGAACTGACTCGCGAAGCCCTACCATCTCTACAGGCAGC 25 | ACAGGAAGATGTTCAGGTCGAAATCGACGTGGAACAGCTTGAGGACAGAGCGGGCGCAGGAATAATAGAG 26 | ACTCCGAGAGGAGCTATCAAAGTTACTGCCCAACCAACAGACCACGTCGTGGGAGAGTACCTGGTACTCT 27 | CCCCGCAGACCGTACTACGTAGCCAGAAGCTCAGTCTGATTCACGCTTTGGCGGAGCAAGTGAAGACGTG 28 | CACGCACAACGGACGAGCAGGGAGGTATGCGGTCGAAGCGTACGACGGCCGAGTCCTAGTGCCCTCAGGC 29 | TATGCAATCTCGCCTGAAGACTTCCAGAGTCTAAGCGAAAGCGCAACGATGGTGTATAACGAAAGAGAGT 30 | TCGTAAACAGAAAGCTACACCATATTGCGATGCACGGACCAGCCCTGAACACCGACGAAGAGTCGTATGA 31 | GCTGGTGAGGGCAGAGAGGACAGAACACGAGTACGTCTACGACGTGGATCAGAGAAGATGCTGTAAGAAG 32 | GAAGAAGCCGCAGGACTGGTACTGGTGGGCGACTTGACTAATCCGCCCTACCACGAATTCGCATATGAAG 33 | GGCTAAAAATCCGCCCTGCCTGCCCATACAAAATTGCAGTCATAGGAGTCTTCGGAGTACCGGGATCTGG 34 | CAAGTCAGCTATTATCAAGAACCTAGTTACCAGGCAGGACCTGGTGACTAGCGGAAAGAAAGAAAACTGC 35 | CAAGAAATCACCACCAACGTGATGAGACAGAGAGGTCTAGAGATATCTGCACGTACGGTTGACTCGCTGC 36 | TCTTGAATGGATGCAACAGACCAGTCGACGTGTTGTACGTAGACGAGGCGTTTGCGTGCCACTCTGGAAC 37 | GCTACTTGCTTTGATCGCCTTGGTGAGACCAAGGCAGAAAGTTGTACTTTGTGGTGACCCGAAGCAGTGC 38 | GGCTTCTTCAATATGATGCAGATGAAAGTCAACTATAATCACAACATCTGCACCCAAGTGTACCACAAAA 39 | GTATCTCCAGGCGGTGTACACTGCCTGTGACCGCCATTGTGTCATCGTTGCATTACGAAGGCAAAATGCG 40 | CACTACGAATGAGTACAACAAGCCGATTGTAGTGGACACTACAGGCTCAACAAAACCTGACCCTGGAGAC 41 | CTCGTGTTAACGTGCTTCAGAGGGTGGGTTAAACAACTGCAAATTGACTATCGTGGATACGAGGTCATGA 42 | CAGCAGCCGCATCCCAAGGGTTAACCAGAAAAGGAGTTTACGCAGTTAGACAAAAAGTTAATGAAAACCC 43 | GCTCTATGCATCAACGTCAGAGCACGTCAACGTACTCCTAACGCGTACGGAAGGTAAACTGGTATGGAAG 44 | ACACTTTCCGGCGACCCGTGGATAAAGACGCTGCAGAACCCACCGAAAGGAAACTTCAAAGCAACTATTA 45 | AGGAGTGGGAGGTGGAGCATGCATCAATAATGGCGGGCATCTGCAGTCACCAAATGACCTTCGATACATT 46 | CCAAAATAAAGCCAACGTTTGTTGGGCTAAGAGCTTGGTCCCTATCCTCGAAACAGCGGGGATAAAACTA 47 | AATGATAGGCAGTGGTCTCAGATAATTCAAGCCTTCAAAGAAGACAAAGCATACTCACCTGAAGTAGCCC 48 | TGAATGAAATATGTACGCGCATGTATGGGGTGGATCTAGACAGCGGGCTATTTTCTAAACCGTTGGTGTC 49 | TGTGTATTACGCGGATAACCACTGGGATAATAGGCCTGGAGGGAAAATGTTCGGATTTAACCCCGAGGCA 50 | GCATCCATTCTAGAAAGAAAGTATCCATTCACAAAAGGGAAGTGGAACATCAACAAGCAGATCTGCGTGA 51 | CTACCAGGAGGATAGAAGACTTTAACCCTACCACCAACATCATACCGGCCAACAGGAGACTACCACACTC 52 | ATTAGTGGCCGAACACCGCCCAGTAAAAGGGGAAAGAATGGAATGGCTGGTTAACAAGATAAACGGCCAC 53 | CACGTGCTCCTGGTCAGTGACTATAACCTTGCACTGCCTACTAAGAGAGTCACTTGGGTAGCGCCGTTAG 54 | GTGTCCGCGGAGCGGACTACACATACAACCTAGAGTTGGGTCTGCCAGCAACGCTTGGTAGGTATGACCT 55 | TGTGGTCATAAACATCCACACACCTTTTCGCATACACCATTACCAACAGTGCGTCGACCACGCAATGAAA 56 | CTGCAAATGCTCGGGGGTGACTCATTGAGACTGCTCAAACCGGGCGGCTCTCTATTGATCAGAGCATATG 57 | GTTACGCAGATAGAACCAGTGAACGAGTCATCTGCGTATTGGGACGCAAGTTTAGATCGTCTAGAGCGTT 58 | GAAACCACCATGTGTCACCAGCAACACTGAGATGTTTTTCCTATTCAGCAACTTTGACAATGGCAGAAGG 59 | AATTTCACAACTCATGTCATGAACAATCAACTGAATGCAGCCTTCGTAGGACAGGTCACCCGAGCAGGAT 60 | GTGCACCGTCGTACCGGGTAAAACGCATGGACATCGCGAAGAACGATGAAGAGTGCGTAGTCAACGCCGC 61 | TAACCCTCGCGGGTTACCGGGTGACGGTGTTTGCAAGGCAGTATACAAAAAATGGCCGGAGTCCTTTAAG 62 | AACAGTGCAACACCAGTGGGAACCGCAAAAACAGTTATGTGCGGTACGTATCCAGTAATCCACGCTGTTG 63 | GACCAAACTTCTCTAATTATTCGGAGTCTGAAGGGGACCGGGAATTGGCAGCTGCCTATCGAGAAGTCGC 64 | AAAGGAAGTAACTAGGCTGGGAGTAAATAGTGTAGCTATACCTCTCCTCTCCACAGGTGTATACTCAGGA 65 | GGGAAAGACAGGCTGACCCAGTCACTGAACCACCTCTTTACAGCCATGGACTCGACGGATGCAGACGTGG 66 | TCATCTACTGCCGCGACAAAGAATGGGAGAAGAAAATATCTGAGGCCATACAGATGCGGACCCAAGTAGA 67 | GCTGCTGGATGAGCACATCTCCATAGACTGCGATATTGTTCGCGTGCACCCTGACAGCAGCTTGGCAGGC 68 | AGAAAAGGATACAGCACCACGGAAGGCGCACTGTACTCATATCTAGAAGGGACCCGTTTTCATCAGACGG 69 | CTGTGGATATGGCGGAGATACATACTATGTGGCCAAAGCAAACAGAGGCCAATGAGCAAGTCTGCCTATA 70 | TGCCCTGGGGGAAAGTATTGAATCGATCAGGCAGAAATGCCCGGTGGATGATGCAGACGCATCATCTCCC 71 | CCCAAAACTGTCCCGTGCCTTTGCCGTTACGCTATGACTCCAGAACGCGTCACCCGGCTTCGCATGAACC 72 | ACGTCACAAGCATAATTGTGTGTTCTTCGTTTCCCCTCCCAAAGTACAAAATAGAAGGAGTGCAAAAAGT 73 | CAAATGCTCTAAGGTAATGCTATTTGACCACAACGTGCCATCGCGCGTAAGTCCAAGGGAATATAGATCT 74 | TCCCAGGAGTCTGCACAGGAGGCGAGTACAATCACG 75 | 76 | -------------------------------------------------------------------------------- /src/test/resources/vigorUnitTestInput/mmp_rna_editing_Test.fasta: -------------------------------------------------------------------------------- 1 | >77_part1 2 | TAGGGGACACTTTGACACTACCTTGAAAATGTCGTCCGTG 3 | CTCAAAGCATTTGAGCGATTCACTATAGAACAGGAACTTCAAGACAGGGGTGAGGAGGGT 4 | TCAATTCCGCCGGAGACTTTAAAGTCAGCAGTCAAAGTCTTCGTTATTAACACACCCAAT 5 | CCCACCACACGCTACCAGATGCTAAACTTTTGCCTAAGAATAATTTGCAGTCAAAATGCT 6 | AGGGCATCTCACAGGGTAGGTGCATTGATAACATTATTCTCACTTCCCTCGGCAGGTATG 7 | CAAAATCATATTAGACTAGCAGATAGATCACCCGAAGCCCAGATAGAACGCTGTGAGATT 8 | GATGGCTTTGAGCCTGGCACATATAGGCTGATTCCGAATGCACGCGCCAATCTTACTGCC 9 | AATGAAATTGCTGCCTATGCTTTGCTTGCAGATGACCTCCCTCCAACCATAAATAATGGA 10 | ACTCCTTATGTACATGCAGATGTTGAAGGGCAGCCATGTGATGAAATTGAACAATTCCTG 11 | GATCGATGCTACAGTGTACTAATCCAGGCTTGGGTGATGGTCTGTAAATGTATGACAGCT 12 | TACGACCAACCTGCTGGATCTGCTGATCGGCGATTTGCGAAATACCAGCAGCAAGGTCGC 13 | CTGGAAGCAAGATACATGCTGCAGCCAGAAGCCCAAAGGTTGATTCAAACTGCCATCAGG 14 | AAAAGTCTTGTTGTTAGACAGTATCTTACCTTTGAACTCCAACTGGCAAGACGGCAGGGG 15 | TTGCTATCAAACAGATACTATGCAATGGTGGGTGACATTGGAAAGTACATTGAGAATTCA 16 | GGCCTTACTGCCTTCTTTCTCACCCTCAAATATGCACTAGGTACCAAATGGAGTCCTCTG 17 | TCATTGGCCGCATTCACCGGTGAACTCACTAAGCTCCGATCCTTGATGATGTTATATCGA 18 | GATCTCGGAGAACAAGCCAGATACCTTGCTTTGTTGGAGGCTCCCCAAATAATGGACTTT 19 | GCTCCCGGGGGCTACCCATTGATATTCAGTTATGCTATGGGAGTTGGTACAGTCCTAGAT 20 | GTCCAAATGCGAAATTACACTTATGCACGACCTTTCCTAAATGGTTACTATTTCCAGATT 21 | GGGGTTGAGACCGCACGACGGCAACAAGGCACTGTTGACAACAGAGTAGCAGATGATCTA 22 | GGCCTGACTCCTGAACAAAGAACTGAGGTCACTCAGCTTGTTGACAGGCTTGCAAGAGGC 23 | AGAGGTGCGGGAATACCAGGTGGGCCGGTGAATCCCTTTGTTCCTCCAGTTCAACAGCAA 24 | CAACCTGCTGCCGTATATGAGGACATTCCTGCATTGGAGGAATCAGATGACGATGGTGAT 25 | GAAGATGGAGGTGCAGGATTCCAAAATGGAGCACAAGCACCAGCTGTAAGACAGGGAGGT 26 | CAAAATGACTTTAGAGCACAGCCGTTACAGGATCCAATTCAAGCACAACTCTTCATGCCA 27 | TTATATCCTCAAGTCAGCAACATCCCAAATCATCAGAATCATCAGATTAATCGCATCGGG 28 | GGGATGGAACACCAAGATTTATTACGATACAACGAGAATGGTGATTCTCAGCAGGATGCA 29 | AGGGGCGAACACGGAAATACCTTCCCAAACAATCCCAATCAAAACGCACAGTCACAAGTG 30 | GGTGACTGGGATGAGTAGATCACTGACATGACCAAACTACCCCCAACTGCAACAAACTCA 31 | GAACAATCTAGCCACAGCCAACTGCTCAAATCCACTACATTCCATTCATATTTAGTCTTT 32 | AAGAAAAAATTAGGCCCGGAAAGAATTAGTTCTACGAGCATCGACACGATTATCTTGATC 33 | GTGTTTCTTTCCGGGCAAGCCATGGATCAATTTATAAAACAAGATGAAACTGGTGATTTA 34 | ATTGAGACAGGAATGAATGTTGCAAATCACTTCCTATCTGCCCCCATTCAGGGAACCAAC 35 | TTGTTGAGCAAGGCCACAATCATCCCCGGCGTTGCACCAGTACTCATTGGCAATCCAGAG 36 | CAAAAGAACATTCAGTACCCCACTGCATCACATCAGGGATCCAAGTCAAAGGGAAGAAGC 37 | TCAGGGGCCAAGCCCATCATAGTCTCATCTTCCGAAGTAGGCACTGGAGGGACTCAGATT 38 | CCTGAGCCCCTTTTCGCACAAACCGGACAAGGTGGCACTGTCACCACCGTTTATCAAGAT 39 | CCAACTATCCAACCAACAGGTTCATACCGAAGTGTGGAATTGGCTAAGATAGGAAAAGAG 40 | AGAATGATTAATCGATTTGTTGAAAAACCCAGGACCTCAACGCCGGTAACAGAATTTAAG 41 | AGGGGGGCCGGGAGCGGCT 42 | -------------------------------------------------------------------------------- /src/test/resources/vigorUnitTestInput/mmp_rna_editing_Test.txt: -------------------------------------------------------------------------------- 1 | Command line: [exonerate --model protein2genome -q /home/snettem/flua_sam_db -t /home/snettem/git/VIGOR4/src/test/resources/vigorUnitTestInput/mmp_rna_editing_Test.fasta] 2 | Hostname: [snettem-VirtualBox] 3 | 4 | C4 Alignment: 5 | ------------ 6 | Query: AEY76114.1 gene="I" product="I protein" organism="Mumps virus" rna_editing=4/([NA][NA][NG][NA]GGG)/$1GGGG/four non-templated G's inserted during transcription/ db="mmp_db" gene_variation=1 shared_cds="V,P" length=171 splice_form="e513" V4_rna_editing="0/GGGG/[ARWMDHVN][ARWMDHVN][GRSKBDVN][ARWMDHVN][GRSKBDVN][GRSKBDVN][GRSKBDVN]/four non-templated G's inserted during transcription" 7 | Target: 77_part1 8 | Model: protein2genome:local 9 | Raw score: 798 10 | Query range: 0 -> 157 11 | Target range: 1861 -> 2332 12 | 13 | 1 : MetAspGlnPheIleLysGlnAspGluThrGlyAspLeuIleGluThrGlyMetAsnValAl : 21 14 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 15 | MetAspGlnPheIleLysGlnAspGluThrGlyAspLeuIleGluThrGlyMetAsnValAl 16 | 1862 : ATGGATCAATTTATAAAACAAGATGAAACTGGTGATTTAATTGAGACAGGAATGAATGTTGC : 1922 17 | 18 | 22 : aAsnHisPheLeuSerAlaProIleGlnGlyThrAsnLeuLeuSerLysAlaThrIleIleP : 42 19 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 20 | aAsnHisPheLeuSerAlaProIleGlnGlyThrAsnLeuLeuSerLysAlaThrIleIleP 21 | 1923 : AAATCACTTCCTATCTGCCCCCATTCAGGGAACCAACTTGTTGAGCAAGGCCACAATCATCC : 1985 22 | 23 | 43 : roGlyValAlaProValLeuIleGlyAsnProGluGlnLysAsnIleGlnTyrProThrAla : 62 24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 25 | roGlyValAlaProValLeuIleGlyAsnProGluGlnLysAsnIleGlnTyrProThrAla 26 | 1986 : CCGGCGTTGCACCAGTACTCATTGGCAATCCAGAGCAAAAGAACATTCAGTACCCCACTGCA : 2045 27 | 28 | 63 : SerHisGlnGlySerLysSerLysGlyArgSerSerGlyAlaLysProIleIleValSerSe : 83 29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 30 | SerHisGlnGlySerLysSerLysGlyArgSerSerGlyAlaLysProIleIleValSerSe 31 | 2046 : TCACATCAGGGATCCAAGTCAAAGGGAAGAAGCTCAGGGGCCAAGCCCATCATAGTCTCATC : 2108 32 | 33 | 84 : rSerGluValGlyThrGlyGlyThrGlnIleProGluProLeuPheAlaGlnThrGlyGlnG : 104 34 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 35 | rSerGluValGlyThrGlyGlyThrGlnIleProGluProLeuPheAlaGlnThrGlyGlnG 36 | 2109 : TTCCGAAGTAGGCACTGGAGGGACTCAGATTCCTGAGCCCCTTTTCGCACAAACCGGACAAG : 2171 37 | 38 | 105 : lyGlyThrValThrThrValTyrGlnAspProThrIleGlnProThrGlySerTyrArgSer : 124 39 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 40 | lyGlyThrValThrThrValTyrGlnAspProThrIleGlnProThrGlySerTyrArgSer 41 | 2172 : GTGGCACTGTCACCACCGTTTATCAAGATCCAACTATCCAACCAACAGGTTCATACCGAAGT : 2231 42 | 43 | 125 : ValGluLeuAlaLysIleGlyLysGluArgMetIleAsnArgPheValGluLysProArgTh : 145 44 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 45 | ValGluLeuAlaLysIleGlyLysGluArgMetIleAsnArgPheValGluLysProArgTh 46 | 2232 : GTGGAATTGGCTAAGATAGGAAAAGAGAGAATGATTAATCGATTTGTTGAAAAACCCAGGAC : 2294 47 | 48 | 146 : rSerThrProValThrGluPheLysArgGlyGlyGly : 157 49 | |||||||||||||||||||||||||||||||!.!||| 50 | rSerThrProValThrGluPheLysArgGlyAlaGly 51 | 2295 : CTCAACGCCGGTAACAGAATTTAAGAGGGGGGCCGGG : 2332 52 | 53 | vulgar: AEY76114.1 0 157 . 77_part1 1861 2332 + 798 M 157 471 54 | -- completed exonerate analysis 55 | -------------------------------------------------------------------------------- /src/test/resources/vigorUnitTestInput/sequence_flua-reverse.fasta: -------------------------------------------------------------------------------- 1 | >gi|260907760|gb|GU060481.1| Influenza A Virus (A/goose/Czech Republic/1848-K9/2009(H7N9)) segment 3 polymerase PA (PA) gene, complete cds 2 | TTTTGGACAGTATGGATAGCAAATAGTAGCATTGCCACAACTATTTCAGTGCATGTGTGAGGAAGGAGTT 3 | GAACCAAGACGCATTAAGCAAAACCCAGGGATCATTAATCAGGCACTCCTCAATTGCTTCATATAGCCCC 4 | CCAAGATCGAAGGTCCCAGGTTCCAGGTTGTCCCTAAGTGCCTGGACAATGAGAAGCAACTTTCTTGATT 5 | CAGCTGAAAATCCCTCGAGTTGTGGAGATGCATATAGGCTGTTGAATACAGATTTTGCCAGTAAGGTTCT 6 | GCACACCTTCCCAATGGAGCCTTCCTCCACCCCTTTGGGTGACTCTCCAATTGGCCATGTTTCTGATTTG 7 | TTTTCAAAGAATTCTTTGGTCATGTCCTTCTCTTTGACAGAAGACTCGGCTTCAATCATGCTCTCAATTT 8 | GTTGAAGGGATTGAAGAAGGCATCGCCTCATTTCCATGCCCCACTTCATCTTGATCTTGGAAGTCCCATT 9 | GGTTCTCACATACAGGAACATGGGCCTTGACACTTGGCCTATTGCAGTCCGTAGGAGCATGTCTCCTATC 10 | TCGAGAACACAGTACTTTTCCCACTTGTGTGGCTCCAGCCTCGGGTCAGTAAGAGAGAATTCCATGCTCA 11 | CAAAGTTTACTACATCGGTGTCATTTCTCAAATGGGATCTTCCTTTTATAATGAATCCATACAGATTAGT 12 | CTTCCGCCTCCCTTCTTTGGTCCTGCATTTGCTTATCATTGGAATCAGTTGGAAGTCATCCATGGCTGCA 13 | CAGGATGCATTCAACAAGGCTGTGTTTATGTACACTCCTTTCATTATGTATTCAGTAGCCCTGCAATGGG 14 | ATACTTCCGCTGTGAAGTAGTTTCTTCTCATACTCGCAATGTGCTCAATTGGAGCAATGTCTTCCCCTAT 15 | TTCATCAAGCTCAATCCAACTTGAATCTGTCAATTCACATGCCTTGTTGAATTCACTCTGGATCCAGCTT 16 | GCTAGCGATCTAGACTCTGGTTCATCACTGTCATACTGTCTCAGATCGCTAACATCCTTGCAATCCTCAA 17 | AGTCTACCTTCTCCGGTGCCATATTCTCACCAAGTGCCCACTTCAACTGGCTCGTTTTCTTCATGTTCTT 18 | TGTTTTTGGGATTTTCTCCTCATTTTCAATATCTTGGAGTTCTGCCAGCACTTGCTTCCAAGCCAGGAGG 19 | TAATTGGGGTTTATGCCCTTTTCATGTGGTTTTACAATGTTGGGCTCTTTCCAGCCGAAAAATGTCTTCA 20 | TGCATTTGATTGCATCATATAGCGGTATACCCTCCCCCTCATGACTCGGGTCTTCGATGCTTAATTTAAG 21 | GGCATCCATCAGCAGGAACTTCGACCGTTGAGAGCAGGGAGGCCCGTCAGGTAGTTTGAGAGGGCGTGGT 22 | GTTGTCTTCAGAAATGGCTCAATTCGGGCGTTCACTTCTTTTGACATTTGAGAAAGCTTGCCCTCAATGC 23 | AGCCGTTCGGTTCGAATCCATCCACATAGGCTCTAAAGTTTTCAAGGCTGGAGAAGTTCGGTGGGAGACT 24 | TTGGTCGGCAAGCCTGCGCATGGTTCCTGTGATTTCAAATCTTTCTTCAACTGTCTCTTCGCCTCTCTCG 25 | GACTGACGAAAGGAATCCCATAGACCCCTACTGGCCATTTCCTGCCTTATAGTGAACAGCCTGGTTTTGA 26 | TTCTTGCCCTACTCTCTTCGTCAAGAGTGTAGTCCGCTTTGGTGGCCATTTCCTCTCCAGTGAATGAGAA 27 | TATGTGAATGTGTGTCTTCTCTGATTTTATCTTGTTGGCCTTTTCTAGATAGTATATATGAACTTCCCTC 28 | CGTGTTACTCCAATTTCAATGAATCGATTCTCTTTGTAGTCATACAAATCTGGGAGAAATTTAGGTTTCT 29 | CGACTCCTGTGGTGTTGCAGATACTATTCACCACTGTCCAGGCCATCGTTCGGTCTCTCCCTTCAATTAT 30 | CTCAAATCGGTGTTTCAATAATGCATTTGGATCGCCAGATTCTACAATTATTGATTCGCCCCGTTCATCA 31 | ATAAAGTGGAAATCCGAATACATGAAACAGACCTCTAAGTGTGTGCATATTGCGGCAAATTTGTTCGTTT 32 | CGATTTTCGGATCTTCCCCATATTCTTTCATTGCCTTTTCCGCAAGCTCGACAATCATTGGATTGAAGCA 33 | TTGTCGCACAAAATCTTCCATTTTGGATCA 34 | -------------------------------------------------------------------------------- /src/test/resources/vigorUnitTestInput/sequence_flua.fasta: -------------------------------------------------------------------------------- 1 | 2 | 3 | >gi|260907760|gb|GU060481.1| Influenza A Virus (A/goose/Czech Republic/1848-K9/2009(H7N9)) segment 3 polymerase PA (PA) gene, complete cds 4 | TGATCCAAAATGGAAGATTTTGTGCGACAATGCTTCAATCCAATGATTGTCGAGCTTGCGGAAAAGGCAA 5 | TGAAAGAATATGGGGAAGATCCGAAAATCGAAACGAACAAATTTGCCGCAATATGCACACACTTAGAGGT 6 | CTGTTTCATGTATTCGGATTTCCACTTTATTGATGAACGGGGCGAATCAATAATTGTAGAATCTGGCGAT 7 | CCAAATGCATTATTGAAACACCGATTTGAGATAATTGAAGGGAGAGACCGAACGATGGCCTGGACAGTGG 8 | TGAATAGTATCTGCAACACCACAGGAGTCGAGAAACCTAAATTTCTCCCAGATTTGTATGACTACAAAGA 9 | GAATCGATTCATTGAAATTGGAGTAACACGGAGGGAAGTTCATATATACTATCTAGAAAAGGCCAACAAG 10 | ATAAAATCAGAGAAGACACACATTCACATATTCTCATTCACTGGAGAGGAAATGGCCACCAAAGCGGACT 11 | ACACTCTTGACGAAGAGAGTAGGGCAAGAATCAAAACCAGGCTGTTCACTATAAGGCAGGAAATGGCCAG 12 | TAGGGGTCTATGGGATTCCTTTCGTCAGTCCGAGAGAGGCGAAGAGACAGTTGAAGAAAGATTTGAAATC 13 | ACAGGAACCATGCGCAGGCTTGCCGACCAAAGTCTCCCACCGAACTTCTCCAGCCTTGAAAACTTTAGAG 14 | CCTATGTGGATGGATTCGAACCGAACGGCTGCATTGAGGGCAAGCTTTCTCAAATGTCAAAAGAAGTGAA 15 | CGCCCGAATTGAGCCATTTCTGAAGACAACACCACGCCCTCTCAAACTACCTGACGGGCCTCCCTGCTCT 16 | CAACGGTCGAAGTTCCTGCTGATGGATGCCCTTAAATTAAGCATCGAAGACCCGAGTCATGAGGGGGAGG 17 | GTATACCGCTATATGATGCAATCAAATGCATGAAGACATTTTTCGGCTGGAAAGAGCCCAACATTGTAAA 18 | ACCACATGAAAAGGGCATAAACCCCAATTACCTCCTGGCTTGGAAGCAAGTGCTGGCAGAACTCCAAGAT 19 | ATTGAAAATGAGGAGAAAATCCCAAAAACAAAGAACATGAAGAAAACGAGCCAGTTGAAGTGGGCACTTG 20 | GTGAGAATATGGCACCGGAGAAGGTAGACTTTGAGGATTGCAAGGATGTTAGCGATCTGAGACAGTATGA 21 | CAGTGATGAACCAGAGTCTAGATCGCTAGCAAGCTGGATCCAGAGTGAATTCAACAAGGCATGTGAATTG 22 | ACAGATTCAAGTTGGATTGAGCTTGATGAAATAGGGGAAGACATTGCTCCAATTGAGCACATTGCGAGTA 23 | TGAGAAGAAACTACTTCACAGCGGAAGTATCCCATTGCAGGGCTACTGAATACATAATGAAAGGAGTGTA 24 | CATAAACACAGCCTTGTTGAATGCATCCTGTGCAGCCATGGATGACTTCCAACTGATTCCAATGATAAGC 25 | AAATGCAGGACCAAAGAAGGGAGGCGGAAGACTAATCTGTATGGATTCATTATAAAAGGAAGATCCCATT 26 | TGAGAAATGACACCGATGTAGTAAACTTTGTGAGCATGGAATTCTCTCTTACTGACCCGAGGCTGGAGCC 27 | ACACAAGTGGGAAAAGTACTGTGTTCTCGAGATAGGAGACATGCTCCTACGGACTGCAATAGGCCAAGTG 28 | TCAAGGCCCATGTTCCTGTATGTGAGAACCAATGGGACTTCCAAGATCAAGATGAAGTGGGGCATGGAAA 29 | TGAGGCGATGCCTTCTTCAATCCCTTCAACAAATTGAGAGCATGATTGAAGCCGAGTCTTCTGTCAAAGA 30 | GAAGGACATGACCAAAGAATTCTTTGAAAACAAATCAGAAACATGGCCAATTGGAGAGTCACCCAAAGGG 31 | GTGGAGGAAGGCTCCATTGGGAAGGTGTGCAGAACCTTACTGGCAAAATCTGTATTCAACAGCCTATATG 32 | CATCTCCACAACTCGAGGGATTTTCAGCTGAATCAAGAAAGTTGCTTCTCATTGTCCAGGCACTTAGGGA 33 | CAACCTGGAACCTGGGACCTTCGATCTTGGGGGGCTATATGAAGCAATTGAGGAGTGCCTGATTAATGAT 34 | CCCTGGGTTTTGCTTAATGCGTCTTGGTTCAACTCCTTCCTCACACATGCACTGAAATAGTTGTGGCAAT 35 | GCTACTATTTGCTATCCATACTGTCCAAAA 36 | -------------------------------------------------------------------------------- /src/test/resources/vigorUnitTestInput/sequence_flua_1.fasta: -------------------------------------------------------------------------------- 1 | >gi|155016325|gb|CY024819.1| Influenza A virus (A/blue-winged teal/Ohio/566/2006(H7N9)) segment 7, complete sequence 2 | ATTGAAAGATGAGTCTTCTAACCGAGGTCGAAACGTACGTTCTCTCTATCGTCCCGTCAGGCCCCCTCAA 3 | AGCCGAGATCGCGCAGAGACTTGAAGATGTGTTTGCAGGAAAGAACACCGATCTTGAGGCACTCATGGAA 4 | TGGCTAAAGACAAGACCAATCCTGTCACCTCTGACTAAGGGGATTTTAGGATTTGTGTTCACGCTCACCG 5 | TGCCCAGTGAGCGAGGACTGCAGCGTAGACGCTTTGTCCAAAATGCCCTTAATGGGAATGGGGATCCAAA 6 | CAACATGGACAGAGCGGTCAAACTGTACAGGAAGCTAAAAAGGGAAATAACATTCCATGGGGCAAAAGAA 7 | GTGGCACTCAGTTATTCAACTGGTGCACTTGCCAGTTGCATGGGCCTCATATACAACAGGATGGGGACTG 8 | TGACCACTGAAGTGGCATTTGGCCTAGTGTGCGCCACGTGTGAGCAGATTGCTGATTCCCAGCATCGGTC 9 | TCACAGACAAATGGTGACAACAACCAACCCACTAATCAGGCACGAGAACAGAATGGTACTGGCCAGTACT 10 | ACGGCTAAGGCCATGGAGCAAATGGCAGGGTCAAGTGAGCAGGCAGCAGAGGCTATGGAAGTTGCTAGTC 11 | AGGCCAGACAGATGGTGCAGGCAATGAGGACCATTGGGACTCATCCTAGCTCCAGTGCTGGTCTAAAGGA 12 | TGATCTTCTTGAAAATTTGCAGGCCTACCAGAAACGGATGGGAGTGCAGATGCAGCGATTCAAGTGATCC 13 | TCTCGTTATTGCCGCAAGTATCATTGGGATCTTGCACTTGATATTGTGGATTCTTGATCGTCTTTTCTTC 14 | AAATGCATTTATCGTCGCCTTAAATACGGTTTGAAAAGAGGGCCTTCTACGGAAGGAGTGCCTGAGTCTA 15 | TGAGGGAAGAATATCGACAGGAACAGCAGAGTGCTGTGGATGTTGACGATGGTCATTTTGTCAACATAGA 16 | GCTGGAGTAA 17 | -------------------------------------------------------------------------------- /src/test/resources/vigorUnitTestInput/sequence_flua_alignmentTest.txt: -------------------------------------------------------------------------------- 1 | C4 Alignment: 2 | ------------ 3 | Query: AGN69266.1 db="flua_db" gene="PA-X" shared_cds="PA" product="PA-X protein" splice_form="e573i1e123" ribosomal_slippage=Y slippage_motif="[NC]{2}[NT]{3}[NCT]" slippage_offset=1 slippage_frameshift=1 shared_cds="PA" V4_Ribosomal_Slippage="-10/+1/[BCDHKMNSTVWY][BDGKNRSV][BCDGHKMNRSTVWY][ABCDGHKMNRSVWY][ABCDGHKMNRSTVWY][ABCDGHKMNRSTVWY][ABCDGHKMNRSTVWY][ABCDHKMNRSTVWY][ABCDGHKMNRSTVWY][BCDGHKMNRSTVWY][BDHKNTWY][BCDHKMNSTVWY][ABCDHKMNRSTVWY][ABCDGHKMNRSTVWY][BCDGHKMNRSTVWY][ABCDHKMNRSTVWY][ABDGHKMNRSTVWY][ABDGHKMNRSTVWY][BCDGHKMNRSTVWY][BCDHKMNSTVWY][ABCDHKMNRSTVWY][BDGKNRSV]" length=232 4 | Target: gi|260907760|gb|GU060481.1| Influenza A Virus (A/goose/Czech Republic/1848-K9/2009(H7N9)) segment 3 polymerase PA (PA) gene, complete cds 5 | Model: protein2genome:local 6 | Raw score: 1056 7 | Query range: 0 -> 232 8 | Target range: 9 -> 706 9 | 10 | 1 : MetGluAspPheValArgGlnCysPheAsnProMetIleValGluLeuAlaGluLysThrMetL : 22 11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||.!!|||| 12 | MetGluAspPheValArgGlnCysPheAsnProMetIleValGluLeuAlaGluLysAlaMetL 13 | 10 : ATGGAAGATTTTGTGCGACAATGCTTCAATCCAATGATTGTCGAGCTTGCGGAAAAGGCAATGA : 73 14 | 15 | 23 : ysGluTyrGlyGluAsnProLysIleGluIleAsnLysPheAlaAlaIleCysThrHisMetGl : 43 16 | ||||||||||||||:!!||||||||||||! |||||||||||||||||||||||||||:!:|| 17 | ysGluTyrGlyGluAspProLysIleGluThrAsnLysPheAlaAlaIleCysThrHisLeuGl 18 | 74 : AAGAATATGGGGAAGATCCGAAAATCGAAACGAACAAATTTGCCGCAATATGCACACACTTAGA : 136 19 | 20 | 44 : uValCysPheMetTyrSerAspPheHisPheIleAsnGluArgGlyGluSerIleIleIleGlu : 64 21 | ||||||||||||||||||||||||||||||||||:!!|||||||||||||||||||||:!!||| 22 | uValCysPheMetTyrSerAspPheHisPheIleAspGluArgGlyGluSerIleIleValGlu 23 | 137 : GGTCTGTTTCATGTATTCGGATTTCCACTTTATTGATGAACGGGGCGAATCAATAATTGTAGAA : 199 24 | 25 | 65 : ProGlyAspSerAsnAlaLeuLeuLysHisArgPheGluIleIleGluGlyArgAspArgAsnM : 86 26 | !!|||||| !!||||||||||||||||||||||||||||||||||||||||||||||||!..| 27 | SerGlyAspProAsnAlaLeuLeuLysHisArgPheGluIleIleGluGlyArgAspArgThrM 28 | 200 : TCTGGCGATCCAAATGCATTATTGAAACACCGATTTGAGATAATTGAAGGGAGAGACCGAACGA : 265 29 | 30 | 87 : etAlaTrpThrValValAsnSerIleCysAsnThrThrGlyValGlyLysProArgTyrLeuPr : 107 31 | ||||||||||||||||||||||||||||||||||||||||||||! !||||||!:!!:!||||| 32 | etAlaTrpThrValValAsnSerIleCysAsnThrThrGlyValGluLysProLysPheLeuPr 33 | 266 : TGGCCTGGACAGTGGTGAATAGTATCTGCAACACCACAGGAGTCGAGAAACCTAAATTTCTCCC : 328 34 | 35 | 108 : oAspLeuTyrAspTyrLysGluAspArgPheIleGluIleGlyValThrArgArgGluValHis : 128 36 | ||||||||||||||||||||||:!!||||||||||||||||||||||||||||||||||||||| 37 | oAspLeuTyrAspTyrLysGluAsnArgPheIleGluIleGlyValThrArgArgGluValHis 38 | 329 : AGATTTGTATGACTACAAAGAGAATCGATTCATTGAAATTGGAGTAACACGGAGGGAAGTTCAT : 391 39 | 40 | 129 : IleTyrTyrLeuGluLysAlaAsnLysIleLysSerGluAspThrHisIleHisIlePheSerP : 150 41 | ||||||||||||||||||||||||||||||||||||||| ! |||||||||||||||||||||| 42 | IleTyrTyrLeuGluLysAlaAsnLysIleLysSerGluLysThrHisIleHisIlePheSerP 43 | 392 : ATATACTATCTAGAAAAGGCCAACAAGATAAAATCAGAGAAGACACACATTCACATATTCTCAT : 457 44 | 45 | 151 : heThrGlyGluGluMetAlaThrLysAlaAspTyrThrLeuAspGluGluSerArgAlaArgIl : 171 46 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 47 | heThrGlyGluGluMetAlaThrLysAlaAspTyrThrLeuAspGluGluSerArgAlaArgIl 48 | 458 : TCACTGGAGAGGAAATGGCCACCAAAGCGGACTACACTCTTGACGAAGAGAGTAGGGCAAGAAT : 520 49 | 50 | 172 : eLysThrArgLeuPheThrIleArgGlnGluMetAlaSerArgGlyLeuTrpAspSer-PheVa : 192 51 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||#||||| 52 | eLysThrArgLeuPheThrIleArgGlnGluMetAlaSerArgGlyLeuTrpAspSer#PheVa 53 | 521 : CAAAACCAGGCTGTTCACTATAAGGCAGGAAATGGCCAGTAGGGGTCTATGGGATTCCTTTCGT : 584 54 | 55 | 193 : lSerProArgGluAlaLysArgGlnLeuLysLysAspLeuLysSerLysGlyArgCysGluSer : 213 56 | ||||||||||||||||||||||||||||||||||||||||||||||:!!! !! !|||! !.!! 57 | lSerProArgGluAlaLysArgGlnLeuLysLysAspLeuLysSerGlnGluProCysAlaGly 58 | 585 : CAGTCCGAGAGAGGCGAAGAGACAGTTGAAGAAAGATTTGAAATCACAGGAACCATGCGCAGGC : 647 59 | 60 | 214 : LeuLeuThrLysValSerHisGlnThrSerGlnValSerThrThrLeuGluProMet : 232 61 | |||! !|||||||||||||||!:!||||||! !!.!! !! !||||||||||||||| 62 | LeuProThrLysValSerHisArgThrSerProAlaLeuLysThrLeuGluProMet 63 | 648 : TTGCCGACCAAAGTCTCCCACCGAACTTCTCCAGCCTTGAAAACTTTAGAGCCTATG : 706 64 | 65 | vulgar: AGN69266.1 0 232 . gi|260907760|gb|GU060481.1| 9 706 + 1056 M 190 570 F 0 1 M 42 126 66 | -------------------------------------------------------------------------------- /src/test/resources/vigorUnitTestInput/sequence_spliceSites.fasta: -------------------------------------------------------------------------------- 1 | >gi|155016325|gb|CY024819.1| Influenza A virus (A/blue-winged teal/Ohio/566/2006(H7N9)) segment 7, complete sequence 2 | ATTGAAAGATGAGTCTTCTAACCGAGGTCGAAACGTACGTTCTCTCTATCGTCCCGTCAGGCCCCCTCAA 3 | AGCCGAGATCGCGCAGAGACTTGAAGATGTGTTTGCAGGAAAGAACACCGATCTTGAGGCACTCATGGAA 4 | TGGCTAAAGACAAGACCAATCCTGTCACCTCTGACTAAGGGGATTTTAGGATTTGTGTTCACGCTCACCG 5 | TGCCCAGTGAGCGAGGACTGCAGCGTAGACGCTTTGTCCAAAATGCCCTTAATGGGAATGGGGATCCAAA 6 | CAACATGGACAGAGCGGTCAAACTGTACAGGAAGCTAAAAAGGGAAATAACATTCCATGGGGCAAAAGAA 7 | GTGGCACTCAGTTATTCAACTGGTGCACTTGCCAGTTGCATGGGCCTCATATACAACAGGATGGGGACTG 8 | TGACCACTGAAGTGGCATTTGGCCTAGTGTGCGCCACGTGTGAGCAGATTGCTGATTCCCAGCATCGGTC 9 | TCACAGACAAATGGTGACAACAACCAACCCACTAATCAGGCACGAGAACAGAATGGTACTGGCCAGTACT 10 | ACGGCTAAGGCCATGGAGCAAATGGCAGGGTCAAGTGAGCAGGCAGCAGAGGCTATGGAAGTTGCTAGTC 11 | AGGCCAGACAGATGGTGCAGGCAATGAGGACCATTGGGACTCATCCTAGCTCCAGTGCTGGTCTAAAGGA 12 | TGATCTTCTTGAAAATTTGCAGGCCTACCAGAAACGGATGGGAGTGCAGATGCAGCGATTCAAGTGATCC 13 | TCTCGTTATTGCCGCAAGTATCATTGGGATCTTGCACTTGATATTGTGGATTCTTGATCGTCTTTTCTTC 14 | AAATGCATTTATCGTCGCCTTAAATACGGTTTGAAAAGAGGGCCTTCTACGGAAGGAGTGCCTGAGTCTA 15 | TGAGGGAAGAATATCGACAGGAACAGCAGAGTGCTGTGGATGTTGACGATGGTCATTTTGTCAACATAGA 16 | GCTGGAGTAA 17 | -------------------------------------------------------------------------------- /vigor4-openjdk.docker: -------------------------------------------------------------------------------- 1 | FROM openjdk:11-jdk-slim 2 | 3 | Label name="Vigor4 OpenJDK 11" \ 4 | author="James Christensen " \ 5 | vendor="JCVI" \ 6 | license="GPLv3" \ 7 | build-date="20190204" 8 | 9 | 10 | RUN apt-get update && apt-get -y install \ 11 | exonerate \ 12 | git \ 13 | maven \ 14 | && rm -rf /var/lib/apt/lists/* 15 | 16 | RUN useradd --inactive -1 --create-home --comment "Vigor4" --shell /bin/bash vigor4 17 | USER vigor4 18 | WORKDIR /home/vigor4 19 | RUN git clone https://github.com/JCVenterInstitute/VIGOR4.git vigor4-repo \ 20 | && git clone https://github.com/JCVenterInstitute/VIGOR_DB vigor-db-repo \ 21 | && mkdir /home/vigor4/vigor4-installs \ 22 | && cd vigor4-repo \ 23 | && mvn package \ 24 | && (find target -maxdepth 1 -name 'vigor-4*.zip' | xargs unzip -d /home/vigor4/vigor4-installs) \ 25 | && cd /home/vigor4 \ 26 | && (ls -tr1 /home/vigor4/vigor4-installs/ | tail -n1) \ 27 | && (ls -tr1 /home/vigor4/vigor4-installs/ | tail -n1 | xargs -I{} ln -s /home/vigor4/vigor4-installs/{} /home/vigor4/vigor4 ) \ 28 | && (echo "\nreference_database_path=/home/vigor4/vigor-db-repo/Reference_DBs/\nexonerate_path=/usr/bin/exonerate\ntemporary_directory=/tmp\n" > /home/vigor4/vigor4/config/vigor.ini) \ 29 | && (echo "\n(echo \$PATH| grep -q /home/vigor4/vigor4/bin) || PATH=\$PATH:/home/vigor4/vigor4/bin" >> /home/vigor4/.bashrc) 30 | -------------------------------------------------------------------------------- /vigor4-ubuntu.docker: -------------------------------------------------------------------------------- 1 | FROM ubuntu:cosmic-20190122 2 | 3 | Label name="Vigor4 Ubuntu" \ 4 | author="James Christensen " \ 5 | vendor="JCVI" \ 6 | license="GPLv3" \ 7 | build-date="20190204" 8 | 9 | RUN apt-get update && apt-get -y install \ 10 | exonerate \ 11 | git \ 12 | maven \ 13 | openjdk-11-jre-headless \ 14 | unzip \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | RUN useradd --inactive -1 --create-home --comment "Vigor4" --shell /bin/bash vigor4 18 | USER vigor4 19 | WORKDIR /home/vigor4 20 | RUN git clone https://github.com/JCVenterInstitute/VIGOR4.git vigor4-repo \ 21 | && git clone https://github.com/JCVenterInstitute/VIGOR_DB vigor-db-repo \ 22 | && mkdir /home/vigor4/vigor4-installs \ 23 | && cd vigor4-repo \ 24 | && mvn package \ 25 | && (find target -maxdepth 1 -name 'vigor-4*.zip' | xargs unzip -d /home/vigor4/vigor4-installs) \ 26 | && cd /home/vigor4 \ 27 | && (ls -tr1 /home/vigor4/vigor4-installs/ | tail -n1) \ 28 | && (ls -tr1 /home/vigor4/vigor4-installs/ | tail -n1 | xargs -I{} ln -s /home/vigor4/vigor4-installs/{} /home/vigor4/vigor4 ) \ 29 | && (echo "\nreference_database_path=/home/vigor4/vigor-db-repo/Reference_DBs/\nexonerate_path=/usr/bin/exonerate\ntemporary_directory=/tmp\n" > /home/vigor4/vigor4/config/vigor.ini) \ 30 | && (echo "\n(echo \$PATH| grep -q /home/vigor4/vigor4/bin) || PATH=\$PATH:/home/vigor4/vigor4/bin" >> /home/vigor4/.bashrc) 31 | 32 | --------------------------------------------------------------------------------