diff --git a/.gitignore b/.gitignore index a6c390b..0e18c40 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,4 @@ build build.xml manifest.mf nbproject -dist/README.TXT -dist/NanoOK.jar +dist/README.TXT diff --git a/HDF5License.txt b/HDF5License.txt new file mode 100644 index 0000000..b6eee1e --- /dev/null +++ b/HDF5License.txt @@ -0,0 +1,92 @@ + +Copyright Notice and License Terms for +HDF5 (Hierarchical Data Format 5) Software Library and Utilities +----------------------------------------------------------------------------- + +HDF5 (Hierarchical Data Format 5) Software Library and Utilities +Copyright 2006-2015 by The HDF Group. + +NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities +Copyright 1998-2006 by the Board of Trustees of the University of Illinois. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted for any purpose (including commercial purposes) +provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or materials provided with the distribution. + +3. In addition, redistributions of modified forms of the source or binary + code must carry prominent notices stating that the original code was + changed and the date of the change. + +4. All publications or advertising materials mentioning features or use of + this software are asked, but not required, to acknowledge that it was + developed by The HDF Group and by the National Center for Supercomputing + Applications at the University of Illinois at Urbana-Champaign and + credit the contributors. + +5. Neither the name of The HDF Group, the name of the University, nor the + name of any Contributor may be used to endorse or promote products derived + from this software without specific prior written permission from + The HDF Group, the University, or the Contributor, respectively. + +DISCLAIMER: +THIS SOFTWARE IS PROVIDED BY THE HDF GROUP AND THE CONTRIBUTORS +"AS IS" WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. In no +event shall The HDF Group or the Contributors be liable for any damages +suffered by the users arising out of the use of this software, even if +advised of the possibility of such damage. + +----------------------------------------------------------------------------- +----------------------------------------------------------------------------- + +Contributors: National Center for Supercomputing Applications (NCSA) at +the University of Illinois, Fortner Software, Unidata Program Center (netCDF), +The Independent JPEG Group (JPEG), Jean-loup Gailly and Mark Adler (gzip), +and Digital Equipment Corporation (DEC). + +----------------------------------------------------------------------------- + +Portions of HDF5 were developed with support from the Lawrence Berkeley +National Laboratory (LBNL) and the United States Department of Energy +under Prime Contract No. DE-AC02-05CH11231. + +----------------------------------------------------------------------------- + +Portions of HDF5 were developed with support from the University of +California, Lawrence Livermore National Laboratory (UC LLNL). +The following statement applies to those portions of the product and must +be retained in any redistribution of source code, binaries, documentation, +and/or accompanying materials: + + This work was partially produced at the University of California, + Lawrence Livermore National Laboratory (UC LLNL) under contract + no. W-7405-ENG-48 (Contract 48) between the U.S. Department of Energy + (DOE) and The Regents of the University of California (University) + for the operation of UC LLNL. + + DISCLAIMER: + This work was prepared as an account of work sponsored by an agency of + the United States Government. Neither the United States Government nor + the University of California nor any of their employees, makes any + warranty, express or implied, or assumes any liability or responsibility + for the accuracy, completeness, or usefulness of any information, + apparatus, product, or process disclosed, or represents that its use + would not infringe privately- owned rights. Reference herein to any + specific commercial products, process, or service by trade name, + trademark, manufacturer, or otherwise, does not necessarily constitute + or imply its endorsement, recommendation, or favoring by the United + States Government or the University of California. The views and + opinions of authors expressed herein do not necessarily state or reflect + those of the United States Government or the University of California, + and shall not be used for advertising or product endorsement purposes. +----------------------------------------------------------------------------- + + diff --git a/bin/nanook b/bin/nanook index 85b38a7..16fe060 100755 --- a/bin/nanook +++ b/bin/nanook @@ -2,16 +2,20 @@ JAVA_ARGS="-Xmx2048m" -if [ -z "$NANOOK_SCRIPT_DIR" ] ; then - echo "Error: You must set NANOOK_SCRIPT_DIR before running." +if [ -z "$NANOOK_DIR" ] ; then + echo "Error: You must set NANOOK_DIR before running." exit 1 fi -JARFILE=${NANOOK_SCRIPT_DIR}/NanoOK.jar +JARFILE=${NANOOK_DIR}/dist/NanoOK.jar if [ ! -f ${JARFILE} ] ; then - echo "Error: Can't find NanoOK.jar - it needs to be inside the directory pointed to by NANOOK_SCRIPT_DIR which is currently ${NANOOK_SCRIPT_DIR}" + echo "Error: Can't find NanoOK.jar - it needs to be inside the dist subdirectory of the directory pointed to by NANOOK_DIR which is currently ${NANOOK_DIR}" exit 1 fi +# If your library path (DYLD_LIBRARY_PATH on MAC) doesn't include HDF5 libraries, +# you can manually set it here by adding a -Djava.library.path=/path/to/lib/dir +# to the java command... + exec java ${JAVA_ARGS} -jar ${JARFILE} "$@" diff --git a/bin/NanoOK.jar b/dist/NanoOK.jar similarity index 67% rename from bin/NanoOK.jar rename to dist/NanoOK.jar index fdee555..0243a93 100644 Binary files a/bin/NanoOK.jar and b/dist/NanoOK.jar differ diff --git a/dist/README.TXT b/dist/README.TXT new file mode 100644 index 0000000..f7bcf4a --- /dev/null +++ b/dist/README.TXT @@ -0,0 +1,32 @@ +======================== +BUILD OUTPUT DESCRIPTION +======================== + +When you build an Java application project that has a main class, the IDE +automatically copies all of the JAR +files on the projects classpath to your projects dist/lib folder. The IDE +also adds each of the JAR files to the Class-Path element in the application +JAR files manifest file (MANIFEST.MF). + +To run the project from the command line, go to the dist folder and +type the following: + +java -jar "NanoOK.jar" + +To distribute this project, zip up the dist folder (including the lib folder) +and distribute the ZIP file. + +Notes: + +* If two JAR files on the project classpath have the same name, only the first +JAR file is copied to the lib folder. +* Only JAR files are copied to the lib folder. +If the classpath contains other types of files or folders, these files (folders) +are not copied. +* If a library on the projects classpath also has a Class-Path element +specified in the manifest,the content of the Class-Path element has to be on +the projects runtime path. +* To set a main class in a standard Java project, right-click the project node +in the Projects window and choose Properties. Then click Run and enter the +class name in the Main Class field. Alternatively, you can manually type the +class name in the manifest Main-Class element. diff --git a/dist/javadoc/allclasses-frame.html b/dist/javadoc/allclasses-frame.html deleted file mode 100644 index 3e08caa..0000000 --- a/dist/javadoc/allclasses-frame.html +++ /dev/null @@ -1,57 +0,0 @@ - - - -
- - -Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final int |
-TYPE_BOTTOM |
-2 |
-
-
-public static final int |
-TYPE_TOP |
-1 |
-
Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final java.lang.String |
-VERSION_STRING |
-"v0.23" |
-
Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final int |
-FASTA |
-1 |
-
-
-public static final int |
-FASTQ |
-2 |
-
-
-public static final int |
-MAX_KMER |
-5000 |
-
-
-public static final int |
-MAX_READ_LENGTH |
-1000000 |
-
-
-public static final int |
-MAX_READS |
-1000000 |
-
-
-public static final int |
-MIN_ALIGNMENTS |
-10 |
-
-
-public static final int |
-MODE_ALIGN |
-2 |
-
-
-public static final int |
-MODE_ANALYSE |
-3 |
-
-
-public static final int |
-MODE_EXTRACT |
-1 |
-
-
-public static final int |
-READTYPE_COMBINED |
-0 |
-
-
-public static final int |
-READTYPE_FAIL |
-2 |
-
-
-public static final int |
-READTYPE_PASS |
-1 |
-
-
-public static final int |
-TYPE_2D |
-2 |
-
-
-public static final int |
-TYPE_ALL |
--1 |
-
-
-public static final int |
-TYPE_COMPLEMENT |
-1 |
-
-
-public static final int |
-TYPE_DELETION |
-1 |
-
-
-public static final int |
-TYPE_INSERTION |
-0 |
-
-
-public static final int |
-TYPE_SUBSTITUTION |
-2 |
-
-
-public static final int |
-TYPE_TEMPLATE |
-0 |
-
Modifier and Type | -Constant Field | -Value | -
---|---|---|
-
-public static final java.lang.String |
-TYPE_STRING_2D |
-"/Analyses/Basecall_2D_000/BaseCalled_2D/Fastq" |
-
-
-public static final java.lang.String |
-TYPE_STRING_COMPLEMENT |
-"/Analyses/Basecall_2D_000/BaseCalled_complement/Fastq" |
-
-
-public static final java.lang.String |
-TYPE_STRING_TEMPLATE |
-"/Analyses/Basecall_2D_000/BaseCalled_template/Fastq" |
-
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
-Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
-Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
-Each annotation type has its own separate page with the following sections:
-Each enum has its own separate page with the following sections:
-Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
-There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
-The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
-These links take you to the next or previous class, interface, package, or related page.
-These links show and hide the HTML frames. All pages are available with or without frames.
-The All Classes link shows all classes and interfaces except non-static nested types.
-Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
-The Constant Field Values page lists the static final fields and their values.
-public class Alignment
-extends java.lang.Object
-implements java.lang.Comparable
-Constructor and Description | -
---|
Alignment(int s,
- java.lang.String qName,
- int qSize,
- int qStart,
- int qAlnSize,
- java.lang.String qs,
- java.lang.String hName,
- int hSize,
- int hStart,
- int hAlnSize,
- java.lang.String hs,
- boolean cigar) |
-
Modifier and Type | -Method and Description | -
---|---|
int |
-compareTo(java.lang.Object o) |
-
int |
-getHitAlignmentSize() |
-
int |
-getHitEnd() |
-
java.lang.String |
-getHitName() |
-
int |
-getHitSequenceSize() |
-
int |
-getHitStart() |
-
java.lang.String |
-getHitStrand() |
-
java.lang.String |
-getHitString() |
-
int |
-getQuertEnd() |
-
int |
-getQueryAlignmentSize() |
-
java.lang.String |
-getQueryName() |
-
int |
-getQuerySequenceSize() |
-
int |
-getQueryStart() |
-
java.lang.String |
-getQueryStrand() |
-
java.lang.String |
-getQueryString() |
-
int |
-getScore() |
-
boolean |
-isCIGAR() |
-
void |
-setHitStrand(java.lang.String s) |
-
void |
-setQueryStrand(java.lang.String s) |
-
void |
-writeMafFile(java.lang.String filename) |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Alignment(int s, - java.lang.String qName, - int qSize, - int qStart, - int qAlnSize, - java.lang.String qs, - java.lang.String hName, - int hSize, - int hStart, - int hAlnSize, - java.lang.String hs, - boolean cigar)-
public void setQueryStrand(java.lang.String s)-
public void setHitStrand(java.lang.String s)-
public java.lang.String getQueryStrand()-
public java.lang.String getHitStrand()-
public int getScore()-
public java.lang.String getQueryName()-
public int getQuerySequenceSize()-
public int getQueryStart()-
public int getQueryAlignmentSize()-
public int getQuertEnd()-
public java.lang.String getQueryString()-
public java.lang.String getHitName()-
public int getHitSequenceSize()-
public int getHitStart()-
public int getHitAlignmentSize()-
public int getHitEnd()-
public java.lang.String getHitString()-
public boolean isCIGAR()-
public void writeMafFile(java.lang.String filename)-
public int compareTo(java.lang.Object o)-
compareTo
in interface java.lang.Comparable
public interface AlignmentFileParser
-Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getAlignmentFileExtension()
-Get file extension of alignments
- |
-
java.util.List<Alignment> |
-getHighestScoringSet()
-Get highest scoring set of alignments (ie.
- |
-
java.lang.String |
-getProgramID()
-Get identifier for the alignment program
- |
-
int |
-getReadFormat()
-Get format of input reads expected
- |
-
java.lang.String |
-getRunCommand(java.lang.String query,
- java.lang.String output,
- java.lang.String reference)
-Get command to run aligner
- |
-
boolean |
-outputsToStdout()
-Return true if this aligner outputs to Stdout and not a file
- |
-
int |
-parseFile(java.lang.String filename,
- AlignmentsTableFile summaryFile,
- ReadSetStats overallStats)
-Parse an alignment file.
- |
-
void |
-setAlignmentParams(java.lang.String p)
-Set alignment parameters to run executable
- |
-
void |
-sortAlignments()
-Sort alignments by score
- |
-
java.lang.String getProgramID()-
java.lang.String getAlignmentFileExtension()-
int getReadFormat()-
void setAlignmentParams(java.lang.String p)-
java.lang.String getRunCommand(java.lang.String query, - java.lang.String output, - java.lang.String reference)-
query
- query fileoutput
- output filereference
- reference fileint parseFile(java.lang.String filename, - AlignmentsTableFile summaryFile, - ReadSetStats overallStats)-
filename
- the filename of the alignments filesummaryFile
- the name of an alignments table summary file to writevoid sortAlignments()-
java.util.List<Alignment> getHighestScoringSet()-
boolean outputsToStdout()-
public class AlignmentInfo
-extends java.lang.Object
-Constructor and Description | -
---|
AlignmentInfo(java.lang.String hn,
- int hs,
- java.lang.String qn,
- int qs,
- int ib,
- int l,
- int t,
- int c,
- int as,
- int ami,
- int qas)
-Constructor.
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-addkCounts(int n,
- int[] s,
- int[] c) |
-
double |
-getAlignmentId()
-Get alignment identity.
- |
-
double |
-getAlignmentIdMinusIndels()
-Get alignment identity.
- |
-
int |
-getAlignmentSize()
-Get alignment size.
- |
-
java.lang.String |
-getHitName() |
-
int |
-getHitSize()
-Get hit size.
- |
-
int |
-getIdenticalBases()
-Get identical bases count.
- |
-
java.lang.String |
-getkCounts() |
-
int |
-getLongestPerfectKmer()
-Get longest perfect kmer.
- |
-
double |
-getMeanPerfectKmer()
-Get mean perfect kmer size.
- |
-
double |
-getPercentQueryAligned()
-Get percentage of query aligned.
- |
-
double |
-getQueryId()
-Get query identity.
- |
-
java.lang.String |
-getQueryName() |
-
int |
-getQuerySize()
-Get query size.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public AlignmentInfo(java.lang.String hn, - int hs, - java.lang.String qn, - int qs, - int ib, - int l, - int t, - int c, - int as, - int ami, - int qas)-
hn
- hit namehs
- hit sizeqn
- query nameqs
- query sizeib
- number of identical basesl
- longest perfect kmert
- sum of perfect kmersc
- count of perfect kmersas
- alignment sizead
- alignment size minus indelsqas
- query alignment sizepublic int getIdenticalBases()-
public int getLongestPerfectKmer()-
public int getAlignmentSize()-
public double getQueryId()-
public java.lang.String getQueryName()-
public java.lang.String getHitName()-
public double getAlignmentId()-
public double getAlignmentIdMinusIndels()-
public double getMeanPerfectKmer()-
public int getQuerySize()-
public int getHitSize()-
public double getPercentQueryAligned()-
public void addkCounts(int n, - int[] s, - int[] c)-
public java.lang.String getkCounts()-
public class AlignmentMerger
-extends java.lang.Object
-Constructor and Description | -
---|
AlignmentMerger(NanoOKOptions o,
- ReferenceSequence r,
- int l,
- ReadSetStats s,
- int t)
-Constructor
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-addAlignment(Alignment a)
-Merge in a new alignment
- |
-
AlignmentInfo |
-endMergeAndStoreStats()
-Declare end of alignment merge
- |
-
int |
-getAlignmentSize()
-Get size of alignment without indels
- |
-
int |
-getOverallHitEnd()
-Get hit end position of merged alignment
- |
-
int |
-getOverallHitSize()
-Get size of hit covered by merged alignment
- |
-
int |
-getOverallHitStart()
-Get hit start position of merged alignment
- |
-
int |
-getOverallQueryEnd()
-Get query end position of merged alignment
- |
-
int |
-getOverallQuerySize()
-Get size of query covered by merged alignment
- |
-
int |
-getOverallQueryStart()
-Get query start position of merged alignment
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public AlignmentMerger(NanoOKOptions o, - ReferenceSequence r, - int l, - ReadSetStats s, - int t)-
r
- the reference, as a ReferenceSequence objectl
- the read lengths
- the read set stats for this read sett
- the type number of read (defined in NanoOKOptions)public void addAlignment(Alignment a)-
a
- a Alignmentpublic AlignmentInfo endMergeAndStoreStats()-
public int getOverallQueryStart()-
public int getOverallQueryEnd()-
public int getOverallHitStart()-
public int getOverallHitEnd()-
public int getOverallQuerySize()-
public int getOverallHitSize()-
public int getAlignmentSize()-
public class AlignmentsTableFile
-extends java.lang.Object
-Constructor and Description | -
---|
AlignmentsTableFile(java.lang.String f)
-Constructor.
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-writeAlignment(java.lang.String alignmentFilename,
- MAFAlignmentLine hitLine,
- MAFAlignmentLine queryLine,
- AlignmentInfo stat)
-Write an alignment line.
- |
-
void |
-writeMergedAlignment(java.lang.String alignmentFilename,
- AlignmentMerger merger,
- AlignmentInfo stat) |
-
void |
-writeNoAlignmentMessage(java.lang.String alignmentFilename)
-Used when no alignment found for this query.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public AlignmentsTableFile(java.lang.String f)-
f
- filename of output filepublic void writeAlignment(java.lang.String alignmentFilename, - MAFAlignmentLine hitLine, - MAFAlignmentLine queryLine, - AlignmentInfo stat)-
alignmentFilename
- filename of alignmenthitLine
- hit objectqueryLine
- query objectstat
- AlignmentInfo statisticspublic void writeMergedAlignment(java.lang.String alignmentFilename, - AlignmentMerger merger, - AlignmentInfo stat)-
public void writeNoAlignmentMessage(java.lang.String alignmentFilename)-
alignmentFilename
- - alignment filenamepublic class BLASRParser -extends SAMParser -implements AlignmentFileParser-
Constructor and Description | -
---|
BLASRParser(NanoOKOptions o,
- References r) |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getProgramID()
-Get identifier for the alignment program
- |
-
int |
-getReadFormat()
-Get format of input reads expected
- |
-
java.lang.String |
-getRunCommand(java.lang.String query,
- java.lang.String output,
- java.lang.String reference)
-Get command to run aligner
- |
-
boolean |
-outputsToStdout()
-Return true if this aligner outputs to Stdout and not a file
- |
-
void |
-setAlignmentParams(java.lang.String p)
-Set alignment parameters to run executable
- |
-
getAlignmentFileExtension, getHighestScoringSet, parseFile, sortAlignments
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAlignmentFileExtension, getHighestScoringSet, parseFile, sortAlignments
public BLASRParser(NanoOKOptions o, - References r)-
public java.lang.String getProgramID()-
AlignmentFileParser
getProgramID
in interface AlignmentFileParser
public int getReadFormat()-
AlignmentFileParser
getReadFormat
in interface AlignmentFileParser
public void setAlignmentParams(java.lang.String p)-
AlignmentFileParser
setAlignmentParams
in interface AlignmentFileParser
public java.lang.String getRunCommand(java.lang.String query, - java.lang.String output, - java.lang.String reference)-
AlignmentFileParser
getRunCommand
in interface AlignmentFileParser
query
- query fileoutput
- output filereference
- reference filepublic boolean outputsToStdout()-
AlignmentFileParser
outputsToStdout
in interface AlignmentFileParser
public class BWAParser -extends SAMParser -implements AlignmentFileParser-
Constructor and Description | -
---|
BWAParser(NanoOKOptions o,
- References r) |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getProgramID()
-Get identifier for the alignment program
- |
-
int |
-getReadFormat()
-Get format of input reads expected
- |
-
java.lang.String |
-getRunCommand(java.lang.String query,
- java.lang.String output,
- java.lang.String reference)
-Get command to run aligner
- |
-
boolean |
-outputsToStdout()
-Return true if this aligner outputs to Stdout and not a file
- |
-
void |
-setAlignmentParams(java.lang.String p)
-Set alignment parameters to run executable
- |
-
getAlignmentFileExtension, getHighestScoringSet, parseFile, sortAlignments
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAlignmentFileExtension, getHighestScoringSet, parseFile, sortAlignments
public BWAParser(NanoOKOptions o, - References r)-
public java.lang.String getProgramID()-
AlignmentFileParser
getProgramID
in interface AlignmentFileParser
public int getReadFormat()-
AlignmentFileParser
getReadFormat
in interface AlignmentFileParser
public void setAlignmentParams(java.lang.String p)-
AlignmentFileParser
setAlignmentParams
in interface AlignmentFileParser
public boolean outputsToStdout()-
AlignmentFileParser
outputsToStdout
in interface AlignmentFileParser
public java.lang.String getRunCommand(java.lang.String query, - java.lang.String output, - java.lang.String reference)-
AlignmentFileParser
getRunCommand
in interface AlignmentFileParser
query
- query fileoutput
- output filereference
- reference filepublic class CIGARString
-extends java.lang.Object
-Constructor and Description | -
---|
CIGARString(java.lang.String cs,
- java.lang.String qseq,
- java.lang.String qf,
- java.lang.String qi,
- int hs,
- java.lang.String hf,
- ReferenceSequence hr)
-Constructor
- |
-
Modifier and Type | -Method and Description | -
---|---|
int |
-getHitAlnSize() |
-
java.lang.String |
-getHitString() |
-
int |
-getQueryAlnSize() |
-
int |
-getQueryStart() |
-
java.lang.String |
-getQueryString() |
-
boolean |
-processString() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public CIGARString(java.lang.String cs, - java.lang.String qseq, - java.lang.String qf, - java.lang.String qi, - int hs, - java.lang.String hf, - ReferenceSequence hr)-
cs
- qseq
- qf
- hs
- hit start position (0-based)hf
- hr
- public boolean processString()-
public int getQueryStart()-
public int getQueryAlnSize()-
public int getHitAlnSize()-
public java.lang.String getQueryString()-
public java.lang.String getHitString()-
public class GCCounter
-extends java.lang.Object
-Constructor and Description | -
---|
GCCounter(int bs,
- java.lang.String outputFilename) |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-addString(java.lang.String line)
-Process sequence string
- |
-
void |
-closeFile()
-Close file
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public class KmerAbundance
-extends java.lang.Object
-implements java.lang.Comparable
-Constructor and Description | -
---|
KmerAbundance(java.lang.String k,
- double ref,
- double read) |
-
Modifier and Type | -Method and Description | -
---|---|
int |
-compareTo(java.lang.Object o) |
-
double |
-getDifference() |
-
java.lang.String |
-getKmer() |
-
double |
-getReadAbundance() |
-
double |
-getRefAbundance() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public KmerAbundance(java.lang.String k, - double ref, - double read)-
public double getDifference()-
public int compareTo(java.lang.Object o)-
compareTo
in interface java.lang.Comparable
public java.lang.String getKmer()-
public double getRefAbundance()-
public double getReadAbundance()-
public class KmerMotifStatistic
-extends java.lang.Object
-Modifier and Type | -Field and Description | -
---|---|
static int |
-TYPE_BOTTOM |
-
static int |
-TYPE_TOP |
-
Constructor and Description | -
---|
KmerMotifStatistic(int s)
-Constructor
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-addMotif(java.lang.String kmer)
-Add a motif to store.
- |
-
void |
-calculateBottomBaseCounts()
-Update motif bases counts for bottom 10 motifs
- |
-
void |
-calculateMotifs()
-Calculate percent each motif has been seen.
- |
-
void |
-calculateTopBaseCounts()
-Update motif base counts for top 10 motifs
- |
-
java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Integer>> |
-getSortedMotifCounts()
-Return ArrayList of sorted motif counts.
- |
-
java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Double>> |
-getSortedMotifPercentages()
-Return ArrayList of sorted motif percentages.
- |
-
int |
-getTotalMotifCount()
-Get total motif count.
- |
-
void |
-outputMotifCounts()
-Write motif counts to stdout.
- |
-
void |
-writeLogoImage(int type,
- java.lang.String filename)
-Write a top 10 or bottom 10 logo image.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final int TYPE_TOP-
public static final int TYPE_BOTTOM-
public KmerMotifStatistic(int s)-
s
- - kmer sizepublic void addMotif(java.lang.String kmer)-
kmer
- motif to storepublic void calculateMotifs()-
public void calculateTopBaseCounts()-
public void calculateBottomBaseCounts()-
public void writeLogoImage(int type, - java.lang.String filename)-
type
- TYPE_TOP for Top 10 or TYPE_BOTTOM for bottom 10filename
- PNG output filenamepublic java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Integer>> getSortedMotifCounts()-
public java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Double>> getSortedMotifPercentages()-
public void outputMotifCounts()-
public int getTotalMotifCount()-
public class KmerTable
-extends java.lang.Object
-Constructor and Description | -
---|
KmerTable(int k) |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-countKmer(java.lang.String kmer) |
-
int |
-get(java.lang.String kmer) |
-
java.util.Set<java.lang.String> |
-getKeys() |
-
int |
-getKmerSize() |
-
java.util.Hashtable |
-getTable() |
-
void |
-writeKmerTable() |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void countKmer(java.lang.String kmer)-
public void writeKmerTable()-
public int getKmerSize()-
public java.util.Set<java.lang.String> getKeys()-
public int get(java.lang.String kmer)-
public java.util.Hashtable getTable()-
public class LastParser -extends MAFParser -implements AlignmentFileParser-
Constructor and Description | -
---|
LastParser(NanoOKOptions o,
- References r) |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getProgramID()
-Get identifier for the alignment program
- |
-
int |
-getReadFormat()
-Get format of input reads expected
- |
-
java.lang.String |
-getRunCommand(java.lang.String query,
- java.lang.String output,
- java.lang.String reference)
-Get command to run aligner
- |
-
boolean |
-outputsToStdout()
-Return true if this aligner outputs to Stdout and not a file
- |
-
void |
-setAlignmentParams(java.lang.String p)
-Set alignment parameters to run executable
- |
-
getAlignmentFileExtension, getHighestScoringSet, parseFile, sortAlignments
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAlignmentFileExtension, getHighestScoringSet, parseFile, sortAlignments
public LastParser(NanoOKOptions o, - References r)-
public java.lang.String getProgramID()-
AlignmentFileParser
getProgramID
in interface AlignmentFileParser
public int getReadFormat()-
AlignmentFileParser
getReadFormat
in interface AlignmentFileParser
public void setAlignmentParams(java.lang.String p)-
AlignmentFileParser
setAlignmentParams
in interface AlignmentFileParser
public java.lang.String getRunCommand(java.lang.String query, - java.lang.String output, - java.lang.String reference)-
AlignmentFileParser
getRunCommand
in interface AlignmentFileParser
query
- query fileoutput
- output filereference
- reference filepublic boolean outputsToStdout()-
AlignmentFileParser
outputsToStdout
in interface AlignmentFileParser
public class MAFAlignmentLine
-extends java.lang.Object
-Constructor and Description | -
---|
MAFAlignmentLine(java.lang.String s)
-Constructor.
- |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getAlignment()
-Get alignment string.
- |
-
int |
-getAlnSize()
-Get alignment size.
- |
-
int |
-getEnd()
-Get end position of alignment
- |
-
java.lang.String |
-getName()
-Get name (ID) of sequence.
- |
-
int |
-getSeqSize()
-Get sequence size.
- |
-
int |
-getStart()
-Get start position of alignment.
- |
-
java.lang.String |
-getStrand()
-Get strand.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public MAFAlignmentLine(java.lang.String s)-
s
- - alignment line stringpublic java.lang.String getName()-
public int getStart()-
public int getEnd()-
public int getAlnSize()-
public java.lang.String getStrand()-
public int getSeqSize()-
public java.lang.String getAlignment()-
public abstract class MAFParser
-extends java.lang.Object
-Constructor and Description | -
---|
MAFParser(NanoOKOptions o,
- References r)
-Constructor.
- |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getAlignmentFileExtension()
-Get file extension of alignment files
- |
-
java.util.ArrayList |
-getHighestScoringSet()
-Get the set of alignments that match the highest scoring reference
- |
-
int |
-parseFile(java.lang.String filename,
- AlignmentsTableFile nonAlignedSummaryFile,
- ReadSetStats overallStats)
-Parse a LAST file.
- |
-
void |
-sortAlignments()
-Sort alignments in order of score
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public MAFParser(NanoOKOptions o, - References r)-
o
- NanoOKOptions objects
- ReadSetStats object to store stats inr
- References objectpublic java.lang.String getAlignmentFileExtension()-
public int parseFile(java.lang.String filename, - AlignmentsTableFile nonAlignedSummaryFile, - ReadSetStats overallStats)-
filename
- filename to parsenonAlignedSummaryFile
- an AlignmentTableFile to output details of anything that doesn't align topublic void sortAlignments()-
public java.util.ArrayList getHighestScoringSet()-
public class MarginAlignParser -extends SAMParser -implements AlignmentFileParser-
Constructor and Description | -
---|
MarginAlignParser(NanoOKOptions o,
- References r) |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getProgramID()
-Get identifier for the alignment program
- |
-
int |
-getReadFormat()
-Get format of input reads expected
- |
-
java.lang.String |
-getRunCommand(java.lang.String query,
- java.lang.String output,
- java.lang.String reference)
-Get command to run aligner
- |
-
boolean |
-outputsToStdout()
-Return true if this aligner outputs to Stdout and not a file
- |
-
void |
-setAlignmentParams(java.lang.String p)
-Set alignment parameters to run executable
- |
-
getAlignmentFileExtension, getHighestScoringSet, parseFile, sortAlignments
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAlignmentFileExtension, getHighestScoringSet, parseFile, sortAlignments
public MarginAlignParser(NanoOKOptions o, - References r)-
public java.lang.String getProgramID()-
AlignmentFileParser
getProgramID
in interface AlignmentFileParser
public int getReadFormat()-
AlignmentFileParser
getReadFormat
in interface AlignmentFileParser
public void setAlignmentParams(java.lang.String p)-
AlignmentFileParser
setAlignmentParams
in interface AlignmentFileParser
public java.lang.String getRunCommand(java.lang.String query, - java.lang.String output, - java.lang.String reference)-
AlignmentFileParser
getRunCommand
in interface AlignmentFileParser
query
- query fileoutput
- output filereference
- reference filepublic boolean outputsToStdout()-
AlignmentFileParser
outputsToStdout
in interface AlignmentFileParser
public class MotifStatistics
-extends java.lang.Object
-Constructor and Description | -
---|
MotifStatistics()
-Constructor
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-addDeletionMotifs(java.lang.String kmer)
-Add a deletion motif.
- |
-
void |
-addInsertionMotifs(java.lang.String kmer)
-Add a insertion motif.
- |
-
void |
-addMotifs(KmerMotifStatistic[] motif,
- java.lang.String kmer)
-Given a stretch of perfect sequence, store motifs at all k size.
- |
-
void |
-addSubstitutionMotifs(java.lang.String kmer)
-Add a substitution motif
- |
-
java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Integer>> |
-getSortedDeletionMotifCounts(int k)
-Get a sorted list of deletion motif counts at given kmer size.
- |
-
java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Double>> |
-getSortedDeletionMotifPercentages(int k)
-Get a sorted list of deletion motif percentages at given kmer size.
- |
-
java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Integer>> |
-getSortedInsertionMotifCounts(int k)
-Get a sorted list of insertion motif counts at given kmer size.
- |
-
java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Double>> |
-getSortedInsertionMotifPercentages(int k)
-Get a sorted list of insertion motif percentages at given kmer size.
- |
-
java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Integer>> |
-getSortedSubstitutionMotifCounts(int k)
-Get a sorted list of substitution motif counts at given kmer size.
- |
-
java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Double>> |
-getSortedSubstitutionMotifPercentages(int k)
-Get a sorted list of substitution motif percentages at given kmer size.
- |
-
int |
-getTotalMotifCounts(int errorType,
- int k)
-Get total count of motifs seen
- |
-
void |
-outputAllMotifCounts()
-Output motif counts for all types (debugging).
- |
-
void |
-writeDeletionLogoImage(int type,
- java.lang.String filename,
- int k)
-Write deletion logo image (via KmerMotifStatistic object)
- |
-
void |
-writeInsertionLogoImage(int type,
- java.lang.String filename,
- int k)
-Write insertion logo image (via KmerMotifStatistic object)
- |
-
void |
-writeSubstitutionLogoImage(int type,
- java.lang.String filename,
- int k)
-Write substitution logo image (via KmerMotifStatistic object)
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void addMotifs(KmerMotifStatistic[] motif, - java.lang.String kmer)-
motif
- KmerMotifStatistic object to add tokmer
- perfect sequence to get motifs frompublic void addInsertionMotifs(java.lang.String kmer)-
kmer
- motif to addpublic void addDeletionMotifs(java.lang.String kmer)-
kmer
- motif to addpublic void addSubstitutionMotifs(java.lang.String kmer)-
kmer
- motif to addpublic void outputAllMotifCounts()-
public java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Integer>> getSortedInsertionMotifCounts(int k)-
k
- kmer size requiredpublic java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Integer>> getSortedDeletionMotifCounts(int k)-
k
- kmer size requiredpublic java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Integer>> getSortedSubstitutionMotifCounts(int k)-
k
- kmer size requiredpublic java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Double>> getSortedInsertionMotifPercentages(int k)-
k
- kmer size requiredpublic java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Double>> getSortedDeletionMotifPercentages(int k)-
k
- kmer size requiredpublic java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.Double>> getSortedSubstitutionMotifPercentages(int k)-
k
- kmer size requiredpublic void writeInsertionLogoImage(int type, - java.lang.String filename, - int k)-
type
- either TYPE_TOP or TYPE_BOTTOM (Top 10 or bottom 10)filename
- image filenamek
- kmer sizepublic void writeDeletionLogoImage(int type, - java.lang.String filename, - int k)-
type
- either TYPE_TOP or TYPE_BOTTOM (Top 10 or bottom 10)filename
- image filenamek
- kmer sizepublic void writeSubstitutionLogoImage(int type, - java.lang.String filename, - int k)-
type
- either TYPE_TOP or TYPE_BOTTOM (Top 10 or bottom 10)filename
- image filenamek
- kmer sizepublic int getTotalMotifCounts(int errorType, - int k)-
errorType
- type of error - TYPE_INSERTION etc.k
- kmer sizepublic class NanoOK
-extends java.lang.Object
-Modifier and Type | -Field and Description | -
---|---|
static java.lang.String |
-VERSION_STRING |
-
Modifier and Type | -Method and Description | -
---|---|
static void |
-checkDependencies()
-Check for program dependencies - R, pdflatex
- |
-
static void |
-main(java.lang.String[] args)
-Entry to tool.
- |
-
static void |
-testLogo()
-Test logo plotting
- |
-
static void |
-testParser(NanoOKOptions options,
- OverallStats overallStats,
- References references)
-Test parser
- |
-
static void |
-testSequenceReader()
-Test SequenceReader class
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.lang.String VERSION_STRING-
public static void checkDependencies()-
public static void testLogo()-
public static void testSequenceReader()-
public static void testParser(NanoOKOptions options, - OverallStats overallStats, - References references)-
options
- overallStats
- references
- public static void main(java.lang.String[] args) - throws java.lang.InterruptedException-
args
- command line argumentsjava.lang.InterruptedException
public class NanoOKLog
-extends java.lang.Object
-Modifier and Type | -Method and Description | -
---|---|
void |
-close() |
-
java.io.PrintWriter |
-getPrintWriter() |
-
void |
-open(java.lang.String filename) |
-
void |
-print(java.lang.String s) |
-
void |
-println(java.lang.String s) |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void open(java.lang.String filename)-
public void close()-
public void print(java.lang.String s)-
public void println(java.lang.String s)-
public java.io.PrintWriter getPrintWriter()-
public class NanoOKOptions
-extends java.lang.Object
-Modifier and Type | -Field and Description | -
---|---|
static int |
-FASTA |
-
static int |
-FASTQ |
-
static int |
-MAX_KMER |
-
static int |
-MAX_READ_LENGTH |
-
static int |
-MAX_READS |
-
static int |
-MIN_ALIGNMENTS |
-
static int |
-MODE_ALIGN |
-
static int |
-MODE_ANALYSE |
-
static int |
-MODE_EXTRACT |
-
static int |
-READTYPE_COMBINED |
-
static int |
-READTYPE_FAIL |
-
static int |
-READTYPE_PASS |
-
static int |
-TYPE_2D |
-
static int |
-TYPE_ALL |
-
static int |
-TYPE_COMPLEMENT |
-
static int |
-TYPE_DELETION |
-
static int |
-TYPE_INSERTION |
-
static int |
-TYPE_SUBSTITUTION |
-
static int |
-TYPE_TEMPLATE |
-
Constructor and Description | -
---|
NanoOKOptions() |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-checkAndMakeReferenceAnalysisDir(java.lang.String reference)
-Check if an analysis reference directory exists and make if not.
- |
-
void |
-checkDirectoryStructure()
-Check if various required directories exist and create if not.
- |
-
boolean |
-doKmerCounting() |
-
boolean |
-doMakePDF()
-Check if to make report or not
- |
-
boolean |
-doMakeReport()
-Check if to make report or not
- |
-
boolean |
-doParseAlignments()
-Check if to parse alignments or not
- |
-
boolean |
-doPlotGraphs()
-Check if to plot graphs or not
- |
-
boolean |
-fixIDs() |
-
boolean |
-fixRandom() |
-
java.lang.String |
-getAligner() |
-
java.lang.String |
-getAlignerDir()
-Get LAST directory.
- |
-
java.lang.String |
-getAlignerParams() |
-
java.lang.String |
-getAlignmentSummaryFilename()
-Get filename of alignment summary file.
- |
-
java.lang.String |
-getAnalysisDir()
-Get analysis directory.
- |
-
int |
-getCoverageBinSize()
-Get coverage graph bin size.
- |
-
static java.lang.String |
-getErrorTypeFromInt(int n)
-Get an error type string (Insertion, Deletion, Substitution) from an integer.
- |
-
java.lang.String |
-getFast5Dir() |
-
java.lang.String |
-getFastaDir() |
-
java.lang.String |
-getFastqDir() |
-
java.lang.String |
-getGraphsDir()
-Get graphs directory.
- |
-
java.lang.String |
-getLatexDir()
-Get LaTeX directory.
- |
-
java.lang.String |
-getLengthSummaryFilename()
-Get filename of length summary file.
- |
-
NanoOKLog |
-getLog() |
-
java.lang.String |
-getLogsDir()
-Get logs directory.
- |
-
int |
-getMaxReads()
-Get maximum number of reads (used for debugging)
- |
-
int |
-getNumberOfThreads() |
-
int |
-getNumberOfTypes() |
-
AlignmentFileParser |
-getParser()
-Get the right parser
- |
-
java.lang.String |
-getQueue() |
-
java.lang.String |
-getReadDir()
-Get FASTA directory.
- |
-
int |
-getReadFormat() |
-
java.lang.String |
-getReferenceFile()
-Get name of references file.
- |
-
References |
-getReferences() |
-
int |
-getRunMode() |
-
java.lang.String |
-getSample()
-Get sample name.
- |
-
java.lang.String |
-getSampleDirectory() |
-
java.lang.String |
-getScheduler() |
-
java.lang.String |
-getScriptsDir()
-Get scripts directory.
- |
-
java.lang.String |
-getTexFilename()
-Get LaTeX filename.
- |
-
static java.lang.String |
-getTypeFromInt(int n)
-Get a type string (Template, Complement, 2D) from an integer.
- |
-
void |
-initialiseAlignmentSummaryFile()
-Create a new alignment summary file.
- |
-
boolean |
-isNewStyleDir() |
-
boolean |
-isProcessing2DReads() |
-
boolean |
-isProcessingComplementReads() |
-
boolean |
-isProcessingFailReads()
-Check if processing "fail" reads.
- |
-
boolean |
-isProcessingPassReads()
-Check if processing "pass" reads.
- |
-
boolean |
-isProcessingReadType(int type) |
-
boolean |
-isProcessingTemplateReads() |
-
void |
-parseArgs(java.lang.String[] args)
-Parse command line arguments.
- |
-
void |
-setReadFormat(int f) |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final int MAX_KMER-
public static final int MAX_READ_LENGTH-
public static final int MAX_READS-
public static final int MODE_EXTRACT-
public static final int MODE_ALIGN-
public static final int MODE_ANALYSE-
public static final int FASTA-
public static final int FASTQ-
public static final int TYPE_TEMPLATE-
public static final int TYPE_COMPLEMENT-
public static final int TYPE_2D-
public static final int TYPE_ALL-
public static final int TYPE_INSERTION-
public static final int TYPE_DELETION-
public static final int TYPE_SUBSTITUTION-
public static final int READTYPE_COMBINED-
public static final int READTYPE_PASS-
public static final int READTYPE_FAIL-
public static final int MIN_ALIGNMENTS-
public References getReferences()-
public void parseArgs(java.lang.String[] args)-
args
- array of command line argumentspublic java.lang.String getAligner()-
public java.lang.String getAlignerParams()-
public void setReadFormat(int f)-
public java.lang.String getSample()-
public java.lang.String getReferenceFile()-
public int getCoverageBinSize()-
public static java.lang.String getTypeFromInt(int n)-
n
- integer to convertpublic static java.lang.String getErrorTypeFromInt(int n)-
n
- error type integerpublic void checkDirectoryStructure()-
public void checkAndMakeReferenceAnalysisDir(java.lang.String reference)-
reference
- name of referencepublic void initialiseAlignmentSummaryFile()-
public java.lang.String getAlignmentSummaryFilename()-
public java.lang.String getLengthSummaryFilename()-
public java.lang.String getScriptsDir()-
public java.lang.String getSampleDirectory()-
public java.lang.String getGraphsDir()-
public java.lang.String getFastaDir()-
public java.lang.String getFastqDir()-
public java.lang.String getFast5Dir()-
public java.lang.String getReadDir()-
public java.lang.String getAlignerDir()-
public java.lang.String getLatexDir()-
public java.lang.String getLogsDir()-
public boolean isNewStyleDir()-
public java.lang.String getAnalysisDir()-
public java.lang.String getTexFilename()-
public boolean isProcessingPassReads()-
public boolean isProcessingFailReads()-
public boolean isProcessingComplementReads()-
public boolean isProcessingTemplateReads()-
public boolean isProcessing2DReads()-
public boolean isProcessingReadType(int type)-
public int getNumberOfTypes()-
public boolean doParseAlignments()-
public boolean doPlotGraphs()-
public boolean doMakeReport()-
public boolean doMakePDF()-
public int getMaxReads()-
public int getReadFormat()-
public int getRunMode()-
public boolean fixIDs()-
public boolean fixRandom()-
public java.lang.String getScheduler()-
public int getNumberOfThreads()-
public java.lang.String getQueue()-
public NanoOKLog getLog()-
public AlignmentFileParser getParser()-
options
- public boolean doKmerCounting()-
public class OverallStats
-extends java.lang.Object
-Constructor and Description | -
---|
OverallStats(NanoOKOptions o)
-Constructor.
- |
-
Modifier and Type | -Method and Description | -
---|---|
ReadSetStats |
-getStatsByType(int t)
-Get a set of stats (for either Template, Complement or 2D reads)
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public OverallStats(NanoOKOptions o)-
o
- NanoOKOptions structurepublic ReadSetStats getStatsByType(int t)-
t
- integer type - see defs in NanoOKOptionspublic class ParserRunnable
-extends java.lang.Object
-implements java.lang.Runnable
-Constructor and Description | -
---|
ParserRunnable(NanoOKOptions o,
- ReadSetStats s,
- java.lang.String rp,
- java.lang.String ap,
- int t,
- int pf,
- AlignmentsTableFile nas) |
-
public ParserRunnable(NanoOKOptions o, - ReadSetStats s, - java.lang.String rp, - java.lang.String ap, - int t, - int pf, - AlignmentsTableFile nas)-
public class ProcessLogger
-extends java.lang.Object
-Constructor and Description | -
---|
ProcessLogger() |
-
Modifier and Type | -Method and Description | -
---|---|
java.util.ArrayList |
-checkCommand(java.lang.String command) |
-
java.util.ArrayList |
-getCommandOutput(java.lang.String command,
- boolean stdin,
- boolean stderr) |
-
void |
-runAndLogCommand(java.lang.String command,
- java.lang.String logFilename,
- boolean fAppend) |
-
void |
-runCommand(java.lang.String command) |
-
void |
-setWriteFormat(boolean headings,
- boolean io,
- boolean err) |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public java.util.ArrayList getCommandOutput(java.lang.String command, - boolean stdin, - boolean stderr)-
public void runCommand(java.lang.String command)-
public java.util.ArrayList checkCommand(java.lang.String command)-
public void runAndLogCommand(java.lang.String command, - java.lang.String logFilename, - boolean fAppend)-
public void setWriteFormat(boolean headings, - boolean io, - boolean err)-
public class RGraphPlotter
-extends java.lang.Object
-Constructor and Description | -
---|
RGraphPlotter(NanoOKOptions o)
-Constructor.
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-plot()
-Execute plot commands.
- |
-
void |
-runScript(java.lang.String scriptName,
- java.lang.String logPrefix,
- java.lang.String refName) |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public RGraphPlotter(NanoOKOptions o)-
o
- NanoOKOptions objectpublic void runScript(java.lang.String scriptName, - java.lang.String logPrefix, - java.lang.String refName)-
public void plot() - throws java.lang.InterruptedException-
references
- References object containing all referencesjava.lang.InterruptedException
public class RGraphRunnable
-extends java.lang.Object
-implements java.lang.Runnable
-Constructor and Description | -
---|
RGraphRunnable(java.lang.String cmd,
- java.util.List<java.lang.String> a,
- java.lang.String log) |
-
public class ReadAligner
-extends java.lang.Object
-Constructor and Description | -
---|
ReadAligner(NanoOKOptions o,
- AlignmentFileParser afp)
-Constructor
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-align() |
-
void |
-createDirectories()
-Create directories for output
- |
-
boolean |
-isValidReadFile(java.lang.String filename) |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ReadAligner(NanoOKOptions o, - AlignmentFileParser afp)-
o
- program optionspublic void createDirectories()-
public boolean isValidReadFile(java.lang.String filename)-
public void align() - throws java.lang.InterruptedException-
java.lang.InterruptedException
public class ReadExtractor
-extends java.lang.Object
-Constructor and Description | -
---|
ReadExtractor(NanoOKOptions o)
-Constructor
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-createDirectories()
-Create directories for output
- |
-
void |
-extract()
-Extract reads
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ReadExtractor(NanoOKOptions o)-
o
- program optionspublic class ReadExtractorRunnable
-extends java.lang.Object
-implements java.lang.Runnable
-Modifier and Type | -Field and Description | -
---|---|
java.lang.String |
-filename |
-
java.lang.String |
-inDir |
-
NanoOKOptions |
-options |
-
java.lang.String |
-outDir |
-
static java.lang.String |
-TYPE_STRING_2D |
-
static java.lang.String |
-TYPE_STRING_COMPLEMENT |
-
static java.lang.String |
-TYPE_STRING_TEMPLATE |
-
Constructor and Description | -
---|
ReadExtractorRunnable(NanoOKOptions o,
- java.lang.String in,
- java.lang.String file,
- java.lang.String out) |
-
public static final java.lang.String TYPE_STRING_TEMPLATE-
public static final java.lang.String TYPE_STRING_COMPLEMENT-
public static final java.lang.String TYPE_STRING_2D-
public NanoOKOptions options-
public java.lang.String inDir-
public java.lang.String filename-
public java.lang.String outDir-
public ReadExtractorRunnable(NanoOKOptions o, - java.lang.String in, - java.lang.String file, - java.lang.String out)-
public class ReadLengthsSummaryFile
-extends java.lang.Object
-Constructor and Description | -
---|
ReadLengthsSummaryFile(java.lang.String f)
-Constructor.
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-addReadSetStats(ReadSetStats r)
-Output read stats for a particular type (Template, Complement, 2D).
- |
-
void |
-close()
-Close output file.
- |
-
void |
-open(java.lang.String sample)
-Open output file.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ReadLengthsSummaryFile(java.lang.String f)-
f
- filename of output filepublic void open(java.lang.String sample)-
sample
- sample namepublic void addReadSetStats(ReadSetStats r)-
r
- ReadSetStats object for the typepublic void close()-
public class ReadSet
-extends java.lang.Object
-Constructor and Description | -
---|
ReadSet(int t,
- NanoOKOptions o,
- ReadSetStats s)
-Constructor
- |
-
Modifier and Type | -Method and Description | -
---|---|
ReadSetStats |
-getStats()
-Get stats object.
- |
-
java.lang.String |
-getTypeString()
-Get type of this read set.
- |
-
int |
-processReads()
-Gather length statistics on reads and parse alignments
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ReadSet(int t, - NanoOKOptions o, - ReadSetStats s)-
t
- type (defined in NanoOKOprions)o
- NanoOKOptions objects
- set of stats to associate with this read setpublic int processReads() - throws java.lang.InterruptedException-
java.lang.InterruptedException
public java.lang.String getTypeString()-
public ReadSetStats getStats()-
public class ReadSetStats
-extends java.lang.Object
-Constructor and Description | -
---|
ReadSetStats(NanoOKOptions o,
- int t)
-Constructor
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-addDeletionError(int size,
- java.lang.String kmer)
-Store a deletion error.
- |
-
void |
-addInsertionError(int size,
- java.lang.String kmer)
-Store an insertion error.
- |
-
void |
-addLength(java.lang.String id,
- int l)
-Store a read length in the array of read lengths.
- |
-
void |
-addReadBestKmer(int bestKmer)
-Store best perfect kmers for each read.
- |
-
void |
-addReadFile(int type)
-Update count of read files.
- |
-
void |
-addReadWithAlignment()
-Store a read with an alignment.
- |
-
void |
-addReadWithoutAlignment()
-Store a read without an alignment.
- |
-
void |
-addSubstitutionError(java.lang.String kmer,
- char refChar,
- char subChar)
-Store a substitution error.
- |
-
void |
-calculateStats()
-Calculate various statistics, e.g.
- |
-
void |
-closeKmersFile() |
-
void |
-closeLengthsFile()
-Close the read lengths file.
- |
-
int |
-getLongest()
-Get longest read in this read set.
- |
-
double |
-getMeanLength()
-Get mean length of reads in this read set.
- |
-
MotifStatistics |
-getMotifStatistics()
-Get motif statistics.
- |
-
int |
-getN50()
-Get N50 for this read set.
- |
-
int |
-getN50Count()
-Get N50 count - number of reads of length N50 or greater.
- |
-
int |
-getN90()
-Get N90 for this read set.
- |
-
int |
-getN90Count()
-Get N90 count - number of reads of length N90 or greater.
- |
-
int |
-getNumberOfFailFiles()
-Get number of read files in fail directory
- |
-
int |
-getNumberOfPassFiles()
-Get number of read files in pass directory
- |
-
int |
-getNumberOfReads()
-Get number of reads in this read set.
- |
-
int |
-getNumberOfReadsWithAlignments()
-Get number of reads with alignments in this read set.
- |
-
int |
-getNumberOfReadsWithoutAlignments()
-Get number of reads without alignments in this read set.
- |
-
int |
-getNumberOfSubstitutions()
-Get number of substitutions.
- |
-
int |
-getNumReadFiles()
-Get number of read files.
- |
-
int |
-getNumReads()
-Get number of reads.
- |
-
double |
-getPercentOfReadsWithAlignments()
-Get percentage of reads with alignments
- |
-
double |
-getPercentOfReadsWithoutAlignments()
-Get percentage of reads without alignments
- |
-
int |
-getReadLength(java.lang.String id)
-Get length of read
- |
-
int |
-getShortest()
-Get shortest read in this read set.
- |
-
int[][] |
-getSubstitutionErrors()
-Get substitution error matrix (A, C, G, T vs A, C, G, T).
- |
-
int |
-getTotalBases()
-Get total bases represented by read set.
- |
-
int |
-getType()
-Get type
- |
-
java.lang.String |
-getTypeString()
-Get type as a string.
- |
-
void |
-openLengthsFile()
-Open a text file to store read lengths.
- |
-
void |
-outputMotifStats()
-Write motif stats to screen.
- |
-
void |
-printStats()
-Print statistics to screen.
- |
-
void |
-writekCounts(java.lang.String id,
- int length,
- int nk,
- int[] s,
- int[] kCounts) |
-
void |
-writeSummaryFile(java.lang.String filename)
-Write a short summary file for this read set.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ReadSetStats(NanoOKOptions o, - int t)-
o
- NanoOKOptions objectt
- Type integer (defined in NanoOKOptions)public void openLengthsFile()-
public void closeLengthsFile()-
public void closeKmersFile()-
public void calculateStats()-
public void addReadFile(int type)-
type
- public int getNumberOfPassFiles()-
public int getNumberOfFailFiles()-
public int getType()-
public java.lang.String getTypeString()-
public double getMeanLength()-
public int getLongest()-
public int getShortest()-
public int getN50()-
public int getN50Count()-
public int getN90()-
public int getN90Count()-
public int getNumReads()-
public int getTotalBases()-
public int getNumReadFiles()-
public void addLength(java.lang.String id, - int l)-
id
- ID of readl
- lengthpublic int getReadLength(java.lang.String id)-
id
- of readpublic void addReadWithAlignment()-
public void addReadWithoutAlignment()-
public void addReadBestKmer(int bestKmer)-
bestKmer
- length of best perfect kmerpublic int getNumberOfReads()-
public int getNumberOfReadsWithAlignments()-
public int getNumberOfReadsWithoutAlignments()-
public double getPercentOfReadsWithAlignments()-
public double getPercentOfReadsWithoutAlignments()-
public void printStats()-
public void writeSummaryFile(java.lang.String filename)-
filename
- output filenamepublic void addDeletionError(int size, - java.lang.String kmer)-
size
- size of deletionkmer
- kmer prior to errorpublic void addInsertionError(int size, - java.lang.String kmer)-
size
- size of insertionkmer
- kmer prior to errorpublic void addSubstitutionError(java.lang.String kmer, - char refChar, - char subChar)-
kmer
- kmer prior to errorrefChar
- reference basesubChar
- substituted basepublic int[][] getSubstitutionErrors()-
public int getNumberOfSubstitutions()-
public void outputMotifStats()-
public MotifStatistics getMotifStatistics()-
public void writekCounts(java.lang.String id, - int length, - int nk, - int[] s, - int[] kCounts)-
public class ReferenceSequence
-extends java.lang.Object
-implements java.lang.Comparable
-Constructor and Description | -
---|
ReferenceSequence(java.lang.String i,
- int s,
- java.lang.String n)
-Constructor
- |
-
Modifier and Type | -Method and Description | -
---|---|
int |
-compareTo(java.lang.Object o) |
-
int |
-getBinSize()
-Get bin size for graph plotting
- |
-
java.lang.String |
-getId()
-Get ID for this sequence.
- |
-
KmerTable |
-getKmerTable()
-Get kmer table
- |
-
java.lang.String |
-getName()
-Get display name for this sequence.
- |
-
int |
-getSize()
-Get size (length) of this sequence.
- |
-
ReferenceSequenceStats |
-getStatsByType(int t)
-Get stats for a particular type (Template, Complement, 2D).
- |
-
void |
-openAlignmentSummaryFiles(java.lang.String analysisDir)
-Open alignment summary files for each reference for each type (Template, Complement, 2D).
- |
-
void |
-writeKmerFile(int type,
- java.lang.String filename) |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ReferenceSequence(java.lang.String i, - int s, - java.lang.String n)-
i
- sequence IDs
- size (length) of sequencen
- display name (may be difference to ID in file)public void openAlignmentSummaryFiles(java.lang.String analysisDir)-
analysisDir
- directory to write files topublic ReferenceSequenceStats getStatsByType(int t)-
t
- integer typepublic java.lang.String getId()-
public java.lang.String getName()-
public int getSize()-
public int getBinSize()-
public int compareTo(java.lang.Object o)-
compareTo
in interface java.lang.Comparable
public KmerTable getKmerTable()-
public void writeKmerFile(int type, - java.lang.String filename)-
public class ReferenceSequenceStats
-extends java.lang.Object
-Constructor and Description | -
---|
ReferenceSequenceStats(int s,
- java.lang.String n)
-Constructor.
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-addAlignmentStats(int querySize,
- int alignedSize,
- int alignedSizeMinusIndels,
- int identicalBases,
- java.lang.String hitStrand,
- java.lang.String queryStrand)
-Store alignment stats.
- |
-
void |
-addCoverage(int start,
- int size)
-Increment coverage between two points.
- |
-
void |
-addDeletionError(int size,
- java.lang.String kmer,
- ReadSetStats stats)
-Store a deletion error.
- |
-
void |
-addInsertionError(int size,
- java.lang.String kmer,
- ReadSetStats stats)
-Store an insertion error.
- |
-
void |
-addKmerAbundance(java.lang.String kmer,
- double refAbundance,
- double readAbundance) |
-
void |
-addPerfectKmer(int size)
-Store all perfect kmer sizes for later analysis.
- |
-
void |
-addReadBestKmer(int bestKmer)
-Store best perfect kmer length for each read.
- |
-
void |
-addSubstitutionError(java.lang.String kmer,
- char refChar,
- char subChar,
- ReadSetStats stats)
-Store a substitution error.
- |
-
void |
-clearStats()
-Clear all stats.
- |
-
double |
-getAlignedNegativeStrandPercent()
-Get percent of reads aligned on -ve strand
- |
-
double |
-getAlignedPercentIdentical()
-Get percent identity of aligned bases.
- |
-
double |
-getAlignedPercentIdenticalWithoutIndels()
-Get percent identity of aligned bases.
- |
-
double |
-getAlignedPositiveStrandPercent()
-Get percent of reads aligned on +ve strand
- |
-
AlignmentsTableFile |
-getAlignmentsTableFile()
-Get the associated AlignmentsTableFile object
- |
-
java.util.ArrayList |
-getKmerAbundance() |
-
int |
-getLongestPerfectKmer()
-Get longest perfect kmer length.
- |
-
double |
-getMeanDeletionSize()
-Get the mean deletion size
- |
-
double |
-getMeanInsertionSize()
-Get the mean insertion size
- |
-
double |
-getMeanReadLength()
-Get mean read length
- |
-
int |
-getNumberOfDeletionErrors()
-Get number of deletion errors.
- |
-
int |
-getNumberOfInsertionErrors()
-Getnumber of insertion errors.
- |
-
int |
-getNumberOfReadsWithAlignments()
-Get number of reads with alignments.
- |
-
int |
-getNumberOfSubstitutionErrors()
-Get number of substitution errors.
- |
-
double |
-getPercentDeletionErrors()
-Get percentage of deletion errors
- |
-
double |
-getPercentInsertionErrors()
-Get percentage of insertion errors
- |
-
double |
-getPercentSubstitutionErrors()
-Get percentage of substitution errors
- |
-
KmerTable |
-getReadKmerTable() |
-
double |
-getReadPercentIdentical()
-Get percent identity of read.
- |
-
int |
-getTotalAlignedBases()
-Get the number of aligned bases
- |
-
void |
-openAlignmentsTableFile(java.lang.String filename)
-Create an alignments table file.
- |
-
void |
-sortKmerAbundance() |
-
void |
-writeBestPerfectKmerHist(java.lang.String filename)
-Write data for best perfect kmer histogram.
- |
-
void |
-writeBestPerfectKmerHistCumulative(java.lang.String filename)
-Write data for best perfect kmer cumulative histogram.
- |
-
void |
-writeCoverageData(java.lang.String filename,
- int binSize)
-Write coverage file for later graph plotting.
- |
-
void |
-writeDeletionStats(java.lang.String filename)
-Write a file of deletion stats for plotting.
- |
-
void |
-writeInsertionStats(java.lang.String filename)
-Write a file of insertion stats for plotting.
- |
-
void |
-writePerfectKmerHist(java.lang.String filename)
-Write data for perfect kmer histogram.
- |
-
void |
-writeSummary(java.io.PrintWriter pw,
- java.lang.String format)
-Write a line to the reference sequence summary file.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ReferenceSequenceStats(int s, - java.lang.String n)-
size
- size (length) of referencen
- name of referencepublic void openAlignmentsTableFile(java.lang.String filename)-
filename
- flenamepublic AlignmentsTableFile getAlignmentsTableFile()-
public int getNumberOfReadsWithAlignments()-
public int getLongestPerfectKmer()-
public void clearStats()-
public void addPerfectKmer(int size)-
size
- size of kmerpublic void addCoverage(int start, - int size)-
start
- start positionsize
- sizepublic void addReadBestKmer(int bestKmer)-
bestKmer
- length of best perfect kmerpublic void writeCoverageData(java.lang.String filename, - int binSize)-
filename
- output filenamebinSize
- bin sizepublic void writePerfectKmerHist(java.lang.String filename)-
filename
- output filenamepublic void writeBestPerfectKmerHist(java.lang.String filename)-
filename
- output filenamepublic void writeBestPerfectKmerHistCumulative(java.lang.String filename)-
filename
- output filenamepublic void writeSummary(java.io.PrintWriter pw, - java.lang.String format)-
pw
- PrintWriter object to write withformat
- format string for outputpublic double getMeanReadLength()-
public void addAlignmentStats(int querySize, - int alignedSize, - int alignedSizeMinusIndels, - int identicalBases, - java.lang.String hitStrand, - java.lang.String queryStrand)-
querySize
- query sizealignedSize
- number of aligned basesidenticalBases
- number of identical basespublic void addDeletionError(int size, - java.lang.String kmer, - ReadSetStats stats)-
size
- - size of deletionkmer
- - kmer before errorstats
- - ReadSetStats associated with the errorpublic void addInsertionError(int size, - java.lang.String kmer, - ReadSetStats stats)-
size
- - size of insertionkmer
- - kmer before errorstats
- - ReadSetStats associated with the errorpublic double getMeanDeletionSize()-
public double getMeanInsertionSize()-
public void addSubstitutionError(java.lang.String kmer, - char refChar, - char subChar, - ReadSetStats stats)-
kmer
- - kmer before errorrefChar
- - reference basesubChar
- - substituted basestats
- - ReadSetStats associated with the errorpublic double getAlignedPercentIdentical()-
public double getAlignedPercentIdenticalWithoutIndels()-
public double getReadPercentIdentical()-
public int getNumberOfInsertionErrors()-
public int getNumberOfDeletionErrors()-
public int getNumberOfSubstitutionErrors()-
public double getPercentInsertionErrors()-
public double getPercentDeletionErrors()-
public double getPercentSubstitutionErrors()-
public int getTotalAlignedBases()-
public void writeInsertionStats(java.lang.String filename)-
filename
- output filenamepublic void writeDeletionStats(java.lang.String filename)-
filename
- output filenamepublic double getAlignedPositiveStrandPercent()-
public double getAlignedNegativeStrandPercent()-
public KmerTable getReadKmerTable()-
public void addKmerAbundance(java.lang.String kmer, - double refAbundance, - double readAbundance)-
public void sortKmerAbundance()-
public java.util.ArrayList getKmerAbundance()-
public class References
-extends java.lang.Object
-Constructor and Description | -
---|
References(NanoOKOptions o)
-Constructor
- |
-
Modifier and Type | -Method and Description | -
---|---|
java.util.Set<java.lang.String> |
-getAllIds()
-Return set of all reference sequence IDs.
- |
-
int |
-getLongestIdLength()
-Get the length of the longest ID - used for formatting output.
- |
-
int |
-getNumberOfReferences()
-Get number of references.
- |
-
ReferenceSequence |
-getReferenceById(java.lang.String id)
-Get a ReferenceSequence object from sequence ID.
- |
-
java.util.ArrayList |
-getSortedReferences()
-Return sorted set of all reference sequence IDs.
- |
-
void |
-loadReferences()
-Load references
- |
-
void |
-readSizesFile() |
-
void |
-writeReferenceStatFiles(int type)
-Initiate writing of all statistics data files used to generate graphs.
- |
-
void |
-writeReferenceSummary(int type)
-Write reference summary text file.
- |
-
void |
-writeTexSummary(int type,
- java.io.PrintWriter pw)
-Write reference summary to LaTeX report.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public References(NanoOKOptions o)-
o
- a NanoOKOptions objectpublic void readSizesFile()-
public void loadReferences()-
public ReferenceSequence getReferenceById(java.lang.String id)-
public java.util.Set<java.lang.String> getAllIds()-
public java.util.ArrayList getSortedReferences()-
public void writeReferenceStatFiles(int type)-
type
- a type, as defined in NanoOKOptions (for example TYPE_TEMPLATE)public int getLongestIdLength()-
public int getNumberOfReferences()-
public void writeReferenceSummary(int type)-
type
- type from NanoOKOptionspublic void writeTexSummary(int type, - java.io.PrintWriter pw)-
type
- type from NanoOKOptionspw
- handle to LaTeX filepublic class ReportWriter
-extends java.lang.Object
-Constructor and Description | -
---|
ReportWriter(NanoOKOptions o,
- OverallStats s)
-Constructor.
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-addAllReferenceSections()
-Add sections for each reference sequence.
- |
-
void |
-addLengthsSection()
-Add the read lengths section.
- |
-
void |
-addPassFailSection()
-Add the pass/fail section
- |
-
void |
-close()
-Close the .tex file.
- |
-
java.io.PrintWriter |
-getPrintWriter()
-Get handle to PrintWriter.
- |
-
void |
-makePDF() |
-
void |
-open()
-Open the .tex file.
- |
-
void |
-writeAlignmentsSection(ReadSetStats stats)
-Write the alignments section to the report.
- |
-
void |
-writeMotifRange(int listType,
- int k,
- int colCount)
-Write Top 10 or Bottom 10 moitf section.
- |
-
void |
-writeMotifSection()
-Write motif section of report.
- |
-
void |
-writeReferenceSection(ReferenceSequence refSeq)
-Write a section for a reference sequence.
- |
-
void |
-writeReport()
-Write the LaTeX report.
- |
-
void |
-writeSubstitutionErrorsSection()
-Write section to report on substitution errors.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ReportWriter(NanoOKOptions o, - OverallStats s)-
o
- a NanoOKOptions objectr
- the referencess
- overall statisticspublic void open()-
public void close()-
public void addPassFailSection()-
public void addLengthsSection()-
public void writeAlignmentsSection(ReadSetStats stats)-
stats
- a ReadSetStats objectpublic void writeReferenceSection(ReferenceSequence refSeq)-
refSeq
- reference to writepublic void writeMotifRange(int listType, - int k, - int colCount)-
listType
- either TYPE_TOP or TYPE_BOTTOMk
- kmer sizepublic void writeMotifSection()-
public void writeSubstitutionErrorsSection()-
public void addAllReferenceSections()-
refs
- reference sequencespublic java.io.PrintWriter getPrintWriter()-
public void writeReport()-
public void makePDF()-
public abstract class SAMParser
-extends java.lang.Object
-Constructor and Description | -
---|
SAMParser(NanoOKOptions o,
- References r)
-Parse a SAM file.
- |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getAlignmentFileExtension()
-Get file extension of alignment files
- |
-
java.util.ArrayList |
-getHighestScoringSet()
-Get the set of alignments that match the highest scoring reference
- |
-
int |
-parseFile(java.lang.String filename,
- AlignmentsTableFile nonAlignedSummaryFile,
- ReadSetStats overallStats) |
-
void |
-sortAlignments()
-Sort alignments in order of score
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public SAMParser(NanoOKOptions o, - References r)-
filename
- filename to parsenonAlignedSummaryFile
- an AlignmentTableFile to output details of anything that doesn't align topublic java.lang.String getAlignmentFileExtension()-
public int parseFile(java.lang.String filename, - AlignmentsTableFile nonAlignedSummaryFile, - ReadSetStats overallStats)-
public void sortAlignments()-
public java.util.ArrayList getHighestScoringSet()-
public class SequenceLogo
-extends java.lang.Object
-Constructor and Description | -
---|
SequenceLogo()
-Debugging constructor
- |
-
SequenceLogo(int s)
-Constructor
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-addBase(int position,
- int a,
- int c,
- int g,
- int t)
-Set relative counts at a given position in the logo.
- |
-
void |
-drawImage()
-Draw the logo image.
- |
-
void |
-saveImage(java.lang.String filename)
-Save the logo as an image.
- |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public SequenceLogo(int s)-
size
- size (in bases)public SequenceLogo()-
public void addBase(int position, - int a, - int c, - int g, - int t)-
position
- position (0-offset)a
- number of Asc
- number of Csg
- number of Gst
- number of Tspublic void drawImage()-
public void saveImage(java.lang.String filename)-
filename
- output filenamepublic class SequenceReader
-extends java.lang.Object
-Constructor and Description | -
---|
SequenceReader(boolean cache) |
-
Modifier and Type | -Method and Description | -
---|---|
java.lang.String |
-getID(int i) |
-
int |
-getLength(int i) |
-
int |
-getSequenceCount() |
-
java.lang.String |
-getSubSequence(java.lang.String id,
- int start,
- int end) |
-
int |
-indexFASTAFile(java.lang.String filename,
- java.lang.String indexFilename,
- boolean storeIds)
-Parse a FASTA file
- |
-
int |
-indexFASTQFile(java.lang.String filename) |
-
void |
-storeKmers(int index,
- KmerTable t) |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public int indexFASTQFile(java.lang.String filename)-
public int indexFASTAFile(java.lang.String filename, - java.lang.String indexFilename, - boolean storeIds)-
filename
- filename of FASTA filepublic int getSequenceCount()-
public java.lang.String getID(int i)-
public int getLength(int i)-
public java.lang.String getSubSequence(java.lang.String id, - int start, - int end)-
public void storeKmers(int index, - KmerTable t)-
public class SystemCommandRunnable
-extends java.lang.Object
-implements java.lang.Runnable
-Constructor and Description | -
---|
SystemCommandRunnable(NanoOKOptions ops,
- java.lang.String msg,
- java.lang.String com,
- java.lang.String out,
- java.lang.String log)
-Constructor
- |
-
public SystemCommandRunnable(NanoOKOptions ops, - java.lang.String msg, - java.lang.String com, - java.lang.String out, - java.lang.String log)-
o
- program optionsModifier and Type | -Method and Description | -
---|---|
java.util.List<Alignment> |
-AlignmentFileParser.getHighestScoringSet()
-Get highest scoring set of alignments (ie.
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-AlignmentMerger.addAlignment(Alignment a)
-Merge in a new alignment
- |
-
Modifier and Type | -Class and Description | -
---|---|
class |
-BLASRParser
-Parser for BLASR files
- |
-
class |
-BWAParser
-Parser for BWA files
- |
-
class |
-LastParser
-Parser for LAST alignments
- |
-
class |
-MarginAlignParser
-Parser for marginAlign files
- |
-
Modifier and Type | -Method and Description | -
---|---|
AlignmentFileParser |
-NanoOKOptions.getParser()
-Get the right parser
- |
-
Constructor and Description | -
---|
ReadAligner(NanoOKOptions o,
- AlignmentFileParser afp)
-Constructor
- |
-
Modifier and Type | -Method and Description | -
---|---|
AlignmentInfo |
-AlignmentMerger.endMergeAndStoreStats()
-Declare end of alignment merge
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-AlignmentsTableFile.writeAlignment(java.lang.String alignmentFilename,
- MAFAlignmentLine hitLine,
- MAFAlignmentLine queryLine,
- AlignmentInfo stat)
-Write an alignment line.
- |
-
void |
-AlignmentsTableFile.writeMergedAlignment(java.lang.String alignmentFilename,
- AlignmentMerger merger,
- AlignmentInfo stat) |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-AlignmentsTableFile.writeMergedAlignment(java.lang.String alignmentFilename,
- AlignmentMerger merger,
- AlignmentInfo stat) |
-
Modifier and Type | -Method and Description | -
---|---|
AlignmentsTableFile |
-ReferenceSequenceStats.getAlignmentsTableFile()
-Get the associated AlignmentsTableFile object
- |
-
Modifier and Type | -Method and Description | -
---|---|
int |
-AlignmentFileParser.parseFile(java.lang.String filename,
- AlignmentsTableFile summaryFile,
- ReadSetStats overallStats)
-Parse an alignment file.
- |
-
int |
-MAFParser.parseFile(java.lang.String filename,
- AlignmentsTableFile nonAlignedSummaryFile,
- ReadSetStats overallStats)
-Parse a LAST file.
- |
-
int |
-SAMParser.parseFile(java.lang.String filename,
- AlignmentsTableFile nonAlignedSummaryFile,
- ReadSetStats overallStats) |
-
Constructor and Description | -
---|
ParserRunnable(NanoOKOptions o,
- ReadSetStats s,
- java.lang.String rp,
- java.lang.String ap,
- int t,
- int pf,
- AlignmentsTableFile nas) |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-MotifStatistics.addMotifs(KmerMotifStatistic[] motif,
- java.lang.String kmer)
-Given a stretch of perfect sequence, store motifs at all k size.
- |
-
Modifier and Type | -Method and Description | -
---|---|
KmerTable |
-ReferenceSequence.getKmerTable()
-Get kmer table
- |
-
KmerTable |
-ReferenceSequenceStats.getReadKmerTable() |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-SequenceReader.storeKmers(int index,
- KmerTable t) |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-AlignmentsTableFile.writeAlignment(java.lang.String alignmentFilename,
- MAFAlignmentLine hitLine,
- MAFAlignmentLine queryLine,
- AlignmentInfo stat)
-Write an alignment line.
- |
-
Modifier and Type | -Method and Description | -
---|---|
MotifStatistics |
-ReadSetStats.getMotifStatistics()
-Get motif statistics.
- |
-
Modifier and Type | -Field and Description | -
---|---|
NanoOKOptions |
-ReadExtractorRunnable.options |
-
Modifier and Type | -Method and Description | -
---|---|
static void |
-NanoOK.testParser(NanoOKOptions options,
- OverallStats overallStats,
- References references)
-Test parser
- |
-
Constructor and Description | -
---|
AlignmentMerger(NanoOKOptions o,
- ReferenceSequence r,
- int l,
- ReadSetStats s,
- int t)
-Constructor
- |
-
BLASRParser(NanoOKOptions o,
- References r) |
-
BWAParser(NanoOKOptions o,
- References r) |
-
LastParser(NanoOKOptions o,
- References r) |
-
MAFParser(NanoOKOptions o,
- References r)
-Constructor.
- |
-
MarginAlignParser(NanoOKOptions o,
- References r) |
-
OverallStats(NanoOKOptions o)
-Constructor.
- |
-
ParserRunnable(NanoOKOptions o,
- ReadSetStats s,
- java.lang.String rp,
- java.lang.String ap,
- int t,
- int pf,
- AlignmentsTableFile nas) |
-
ReadAligner(NanoOKOptions o,
- AlignmentFileParser afp)
-Constructor
- |
-
ReadExtractor(NanoOKOptions o)
-Constructor
- |
-
ReadExtractorRunnable(NanoOKOptions o,
- java.lang.String in,
- java.lang.String file,
- java.lang.String out) |
-
ReadSet(int t,
- NanoOKOptions o,
- ReadSetStats s)
-Constructor
- |
-
ReadSetStats(NanoOKOptions o,
- int t)
-Constructor
- |
-
References(NanoOKOptions o)
-Constructor
- |
-
ReportWriter(NanoOKOptions o,
- OverallStats s)
-Constructor.
- |
-
RGraphPlotter(NanoOKOptions o)
-Constructor.
- |
-
SAMParser(NanoOKOptions o,
- References r)
-Parse a SAM file.
- |
-
SystemCommandRunnable(NanoOKOptions ops,
- java.lang.String msg,
- java.lang.String com,
- java.lang.String out,
- java.lang.String log)
-Constructor
- |
-
Modifier and Type | -Method and Description | -
---|---|
static void |
-NanoOK.testParser(NanoOKOptions options,
- OverallStats overallStats,
- References references)
-Test parser
- |
-
Constructor and Description | -
---|
ReportWriter(NanoOKOptions o,
- OverallStats s)
-Constructor.
- |
-
Modifier and Type | -Method and Description | -
---|---|
ReadSetStats |
-ReadSet.getStats()
-Get stats object.
- |
-
ReadSetStats |
-OverallStats.getStatsByType(int t)
-Get a set of stats (for either Template, Complement or 2D reads)
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-ReferenceSequenceStats.addDeletionError(int size,
- java.lang.String kmer,
- ReadSetStats stats)
-Store a deletion error.
- |
-
void |
-ReferenceSequenceStats.addInsertionError(int size,
- java.lang.String kmer,
- ReadSetStats stats)
-Store an insertion error.
- |
-
void |
-ReadLengthsSummaryFile.addReadSetStats(ReadSetStats r)
-Output read stats for a particular type (Template, Complement, 2D).
- |
-
void |
-ReferenceSequenceStats.addSubstitutionError(java.lang.String kmer,
- char refChar,
- char subChar,
- ReadSetStats stats)
-Store a substitution error.
- |
-
int |
-AlignmentFileParser.parseFile(java.lang.String filename,
- AlignmentsTableFile summaryFile,
- ReadSetStats overallStats)
-Parse an alignment file.
- |
-
int |
-MAFParser.parseFile(java.lang.String filename,
- AlignmentsTableFile nonAlignedSummaryFile,
- ReadSetStats overallStats)
-Parse a LAST file.
- |
-
int |
-SAMParser.parseFile(java.lang.String filename,
- AlignmentsTableFile nonAlignedSummaryFile,
- ReadSetStats overallStats) |
-
void |
-ReportWriter.writeAlignmentsSection(ReadSetStats stats)
-Write the alignments section to the report.
- |
-
Constructor and Description | -
---|
AlignmentMerger(NanoOKOptions o,
- ReferenceSequence r,
- int l,
- ReadSetStats s,
- int t)
-Constructor
- |
-
ParserRunnable(NanoOKOptions o,
- ReadSetStats s,
- java.lang.String rp,
- java.lang.String ap,
- int t,
- int pf,
- AlignmentsTableFile nas) |
-
ReadSet(int t,
- NanoOKOptions o,
- ReadSetStats s)
-Constructor
- |
-
Modifier and Type | -Method and Description | -
---|---|
ReferenceSequence |
-References.getReferenceById(java.lang.String id)
-Get a ReferenceSequence object from sequence ID.
- |
-
Modifier and Type | -Method and Description | -
---|---|
void |
-ReportWriter.writeReferenceSection(ReferenceSequence refSeq)
-Write a section for a reference sequence.
- |
-
Constructor and Description | -
---|
AlignmentMerger(NanoOKOptions o,
- ReferenceSequence r,
- int l,
- ReadSetStats s,
- int t)
-Constructor
- |
-
CIGARString(java.lang.String cs,
- java.lang.String qseq,
- java.lang.String qf,
- java.lang.String qi,
- int hs,
- java.lang.String hf,
- ReferenceSequence hr)
-Constructor
- |
-
Modifier and Type | -Method and Description | -
---|---|
ReferenceSequenceStats |
-ReferenceSequence.getStatsByType(int t)
-Get stats for a particular type (Template, Complement, 2D).
- |
-
Modifier and Type | -Method and Description | -
---|---|
References |
-NanoOKOptions.getReferences() |
-
Modifier and Type | -Method and Description | -
---|---|
static void |
-NanoOK.testParser(NanoOKOptions options,
- OverallStats overallStats,
- References references)
-Test parser
- |
-
Constructor and Description | -
---|
BLASRParser(NanoOKOptions o,
- References r) |
-
BWAParser(NanoOKOptions o,
- References r) |
-
LastParser(NanoOKOptions o,
- References r) |
-
MAFParser(NanoOKOptions o,
- References r)
-Constructor.
- |
-
MarginAlignParser(NanoOKOptions o,
- References r) |
-
SAMParser(NanoOKOptions o,
- References r)
-Parse a SAM file.
- |
-
Modifier and Type | -Class and Description | -
---|---|
class |
-BLASRParser
-Parser for BLASR files
- |
-
class |
-BWAParser
-Parser for BWA files
- |
-
class |
-MarginAlignParser
-Parser for marginAlign files
- |
-
Interface | -Description | -
---|---|
AlignmentFileParser | -
- Interface for parsers of alignment files.
- |
-
Class | -Description | -
---|---|
Alignment | -
- Generic class to represent alignment
- |
-
AlignmentInfo | -
- Class to hold information about an alignment.
- |
-
AlignmentMerger | -
- Class to merge alignments
- |
-
AlignmentsTableFile | -
- Represents alignment summary file written by tool and used for graph plotting.
- |
-
BLASRParser | -
- Parser for BLASR files
- |
-
BWAParser | -
- Parser for BWA files
- |
-
CIGARString | -
- Represent and parse a CIGAR string
- |
-
GCCounter | -
- Count GC content in references
- |
-
KmerAbundance | -
- Represent abundance of a kmer
- |
-
KmerMotifStatistic | -
- Class to store kmer motif statistics.
- |
-
KmerTable | -
- KmerTable used for 5-mer comparison
- |
-
LastParser | -
- Parser for LAST alignments
- |
-
MAFAlignmentLine | -
- Class representing an alignment line in a LAST file.
- |
-
MAFParser | -
- Parser for LAST aligner files.
- |
-
MarginAlignParser | -
- Parser for marginAlign files
- |
-
MotifStatistics | -
- Store all motif statistics (ie, insertion, deletion, substitution) at a range
- of sizes (3, 4, 5) for a single read type (Template, Complement or 2D).
- |
-
NanoOK | -
- Entry class for tool.
- |
-
NanoOKLog | -
- Logging
- |
-
NanoOKOptions | -
- Representation of program options and some global constants.
- |
-
OverallStats | -
- Represents overall (as opposed to per reference) stats for Template, Complement and 2D reads.
- |
-
ParserRunnable | -
- Enables multi-threading of parsing
- |
-
ProcessLogger | -
- Execute a system process and log result to a file
- |
-
ReadAligner | -
- Align reads
- |
-
ReadExtractor | -
- Read extractor
- |
-
ReadExtractorRunnable | -
- Enable multi-threading of read extraction
- |
-
ReadLengthsSummaryFile | -
- Represents a summary file containing basic information on read lengths, N50 etc.
- |
-
ReadSet | -
- Represents a read set (Template reads, Complement reads, or 2D reads).
- |
-
ReadSetStats | -
- Represent statistics about a read set (for example Template read set).
- |
-
References | -
- Represents the set of references (sequences) used for the analysis.
- |
-
ReferenceSequence | -
- Represents a sequence (contig) within a reference.
- |
-
ReferenceSequenceStats | -
- Stores stats for each reference sequence, one object per read type (Template, Complement, 2D).
- |
-
ReportWriter | -
- Writes a LaTeX report file.
- |
-
RGraphPlotter | -
- Executes command to plot graphs with R.
- |
-
RGraphRunnable | -
- Enable multi-threading of R plotting
- |
-
SAMParser | -
- Parser for SAM format files.
- |
-
SequenceLogo | -
- Create sequence logo (for error motifs etc.)
- |
-
SequenceReader | -
- Read FASTA files
- |
-
SystemCommandRunnable | -
- Enable multi-threading of system commands
- |
-
Class and Description | -
---|
Alignment
- Generic class to represent alignment
- |
-
AlignmentFileParser
- Interface for parsers of alignment files.
- |
-
AlignmentInfo
- Class to hold information about an alignment.
- |
-
AlignmentMerger
- Class to merge alignments
- |
-
AlignmentsTableFile
- Represents alignment summary file written by tool and used for graph plotting.
- |
-
KmerMotifStatistic
- Class to store kmer motif statistics.
- |
-
KmerTable
- KmerTable used for 5-mer comparison
- |
-
MAFAlignmentLine
- Class representing an alignment line in a LAST file.
- |
-
MAFParser
- Parser for LAST aligner files.
- |
-
MotifStatistics
- Store all motif statistics (ie, insertion, deletion, substitution) at a range
- of sizes (3, 4, 5) for a single read type (Template, Complement or 2D).
- |
-
NanoOKLog
- Logging
- |
-
NanoOKOptions
- Representation of program options and some global constants.
- |
-
OverallStats
- Represents overall (as opposed to per reference) stats for Template, Complement and 2D reads.
- |
-
ReadSetStats
- Represent statistics about a read set (for example Template read set).
- |
-
References
- Represents the set of references (sequences) used for the analysis.
- |
-
ReferenceSequence
- Represents a sequence (contig) within a reference.
- |
-
ReferenceSequenceStats
- Stores stats for each reference sequence, one object per read type (Template, Complement, 2D).
- |
-
SAMParser
- Parser for SAM format files.
- |
-