This page contains the source code for some of the bioinformatics scripts used by the Liston Lab. Most of the scripts are written in Python 2.6.4 and are designed for Unix systems. A few are written as a list of unix commands designed to be executables.

+

This page contains the source code for some of the bioinformatics scripts used by the Liston Lab. Most of the scripts are written in Python 2.6.4 and are designed for Unix systems, although most of them can be run on windows systems. A few are written as a list of unix commands designed to be executables.

<td>A pipeline for combining the free aligner NUCmer and the free short read assembler YASRA so full alignments can be made with one command. Alignreads uses the following scripts from the Liston lab: runyasra.py, sumqual.py, and qualtofa.py. It also uses yasra and its binaries, including lastz. It must be possible for the python interpreter to find these scripts to run alignreads; this can be done saving copies of scripts in the Python26 folder, your bin folder, or modifying your .chsrc file to search where they are saved on your system (nessesary if lastz binaries cannot be found). alignreads preserves almost all of the functionality and output of the five programs it uses, so there are many options (over 40). Because there are so many modifiers, the help menu reached by not providing arguments only has what are expected to be the options used most often; to get all of the options type 'python alignreads.py -H' or 'python alignreads.py --advanced-help'. Since there are many files associated with the alignment, the output is a folder with numerous files organized into subfolders. alignreads.py can also start the pipeline from a folder produced by a previous run of alignreads.py or runyasra.py. In that case, the output is saved in the input folder and separate subfolders are created for each alignment. A more complete discription of alignreads can be found here: [[alignreads.py README]]. </td>

+

<td>A FASTA file containing reads, and A FASTA file containing a reference OR a folder from a previous run of alignreads or runyasra.</td>

+

<td>A folder containing all of the output from every part of the pipeline organized in subfolders based on each programs' output.</td></tr>

+

<tr><td>[[allcomb.py]] v1.2</td>

+

<td>Finds all possible combinations of elements (or group of elements) for every line of a tab-delimitated text file and output every combination, on its own line, to a .txt file.</td>

+

<td>tab-delimitated .txt file</td>

+

<td>tab-delimitated .txt file</td></tr>

<tr><td>[[baseanno.py]] v1.0</td>

<tr><td>[[baseanno.py]] v1.0</td>

-

<td>Converts a file containing a list of annotations, as well as each of their respective start and stop indices, into a file containing a list of base indices, each followed by any annotations that apply at that specific base. Each line of the input file is expected to be whitespace-delaminated, however if your annotations have spaces in them, the script can be made to enforce tab-delimitation. The output file is always tab-delaminated.</td>

+

<td>Converts a file containing a list of annotations, as well as each of their respective start and stop indices, into a file containing a list of base indices, each followed by any annotations that apply at that specific base. Each line of the input file is expected to be whitespace-delimitated, however if your annotations have spaces in them, the script can be made to enforce tab-delimitation. The output file is always tab-delaminated.</td>

<td>Finds base differences between multiple aligned sequences in a single FASTA file and output a tab-delaminated txt file containing the base values for all the sequences at the index where the difference occurred. The script has many modifiers that change what is considered a difference.</td>

+

<td>Finds base differences between multiple aligned sequences in a single FASTA file and output a tab-delimitated txt file containing the base values for all the sequences at the index where the difference occurred. The script has many modifiers that change what is considered a difference.</td>

<td>Calculates statistics for each contig in a Tablet output file and outputs them to a tab-delimitated '.txt' file following the name of their respective contig. The statistics calculated are: number of coverage values, average coverage depth, percent of bases with a coverage greater than zero, and maximum coverage depth. coveragestats.py requires that contig names have at least one non-numerical character.</td>

+

<td>Tablet coverage output file (.txt) or one of the same format</td>

+

<td>Tab-delimitated '.txt' file</td></tr>

+

<tr><td>[[fatomum.py]] v1.0</td>

+

<td>Creates a MUMmer-style output from a FASTA file of aligned sequences. The first line is always considered the reference and is not included in the output. The start index in terms of the reference, and in terms of the contig, as well as the length are recorded for each matching section of the contig.</td>

+

<td>FASTA file containing a reference and its aligned contigs</td>

+

<td>MUMmuer-like output</td></tr>

<tr><td>[[gapstrip.py]] v1.0</td>

<tr><td>[[gapstrip.py]] v1.0</td>

<td>Removes all of the gaps (i.e. '-') that are common (i.e. at the same index) to all of the sequences in an aligned FASTA file. By default, the first sequence is considered the reference and is excluded from the analysis, but the number of sequences that are treated as such can be changed.</td>

<td>Removes all of the gaps (i.e. '-') that are common (i.e. at the same index) to all of the sequences in an aligned FASTA file. By default, the first sequence is considered the reference and is excluded from the analysis, but the number of sequences that are treated as such can be changed.</td>

<td>FASTA file containing two or more aligned sequences.</td>

<td>FASTA file containing two or more aligned sequences.</td>

<td>FASTA file same number of sequences as the input file but, with gaps removed</td></tr>

<td>FASTA file same number of sequences as the input file but, with gaps removed</td></tr>

-

<tr><td>[[sumqual.py]] v1.4</td>

+

<tr><td>[[runyasra.py]] v1.02</td>

-

<td>A script used in conjunction with the free aligners MUMmer/NUCmer and the free short read assembler YASRA. Creates a file with a similar to the format to that of the .qual file YASRA outputs, except each base can have multiple sets of quality values. Uses a .qual file containing the quality scores of multiple contigs and the output file of MUMmer/NUCmer to make a "consensus" .qual file, which contains the quality values in terms of the reference. Given the reference used with MUMmer/NUCmer to get the alignment, sumqual can output a fasta file containing all the sequence for which there is no quality data.</td>

+

<td>Runs the free short read aligner YASRA and organizes its output into a folder. Links to the input data are also saved in the output folder.</td>

+

<td>A FASTA file containing reads, and a FASTA file containg a reference OR a folder from a previous run of alingreades or runyasra.</td>

+

<td>A folder containing all of YASRA's output as well as links to the input data.</td></tr>

+

<tr><td>[[sumqual.py]] v2.12</td>

+

<td>A script used in conjunction with the free aligners NUCmer and the free short read assembler YASRA. Creates a file with a similar to the format to that of the .qual file YASRA outputs, except each base can have multiple sets of quality values. The format preserves all of the alignment, indel, quality, and reference data from the input files. Uses a .qual file containing the quality scores of multiple contigs and the output file of NUCmer to make a "consensus" .qual file, which contains the quality values in terms of the reference. Sumqual's output can be converted to a fasta format using qualtofa.py. td>

<td>similar to .qual input file, except each base can hold the information from more than one contig</td></tr>

<td>similar to .qual input file, except each base can hold the information from more than one contig</td></tr>

-

<tr><td>[[qualtofa.py]] v1.4</td>

+

<tr><td>[[qualtofa.py]] v2.52</td>

-

<td>Selectively extracts the sequence from a quality file and outputs it to a FASTA file. It is designed to be used in conjunction with sumqual.py and accepts its consensus-style output. Conflicting bases from a consensus-style output are condensed into IUPAC ambiguity codes. It has an option to mask all bases with a quality value of less than a user-specified threshold. Another threshold can be assigned for SNPs if a reference is given</td>

+

<td>Selectively extracts the sequence from a quality file and outputs it to a FASTA file. It is designed to be used in conjunction with sumqual.py and accepts its consensus-style output, which preserves all of the alignment, quality and reference information. Conflicting bases on overlapping matches from a consensus-style output are condensed into IUPAC ambiguity codes, or gaps can be added to the reference to accommodate repeated or unmatched sequence if a option is used. It has several masking and trimming options. </td>

<td>quality file (.qual); accepts sumqual.py's output</td>

<td>quality file (.qual); accepts sumqual.py's output</td>

<td>FASTA file</td></tr>

<td>FASTA file</td></tr>

-

<tr><td>[[fatomum.py]] v1.0</td>

-

<td>Creates a MUMmer-style output from a FASTA file of aligned sequences. The first line is always considered the reference and is not included in the output. The start index in terms of the reference, and in terms of the contig, as well as the length are recorded for each matching section of the contig.</td>

-

<td>FASTA file containing a reference and its aligned contigs</td>

-

<td>MUMmuer-like output</td></tr>

</table>

</table>

Current revision

This page contains the source code for some of the bioinformatics scripts used by the Liston Lab. Most of the scripts are written in Python 2.6.4 and are designed for Unix systems, although most of them can be run on windows systems. A few are written as a list of unix commands designed to be executables.

Python Script Conventions

The scripts must be compiled using a Python compiler in the following format:

python theScript.py [modifiers] <Arguments>.

For example, in order to run the script sumqual.py one could enter the following into an Unix shell:

python sumqual.py -c -v ../myQualFile.qual ../myMumFile

This would compile and run the script sumqual.py with the modifiers -c and -v, using myQualFile.qual and myMumFile as arguments. All of the scripts save their output in a file in the current working directory, with a name usually composed of some combination of the arguments and the name of the script. However, one can save the output anywhere, under any name, using the following technique:

The order in which the modifiers are given is not important, however, the order of the required arguments is important. For Example the above modifiers could be entered in the opposite order (-v -c), but the two file paths need to be in a predetermined order. Some scripts have modifiers that require arguments of their own. These modifier arguments should be written directly after their respective modifier. For example, if the above modifier, -c, had a argument, one would type,

python sumqual.py -c theArgument -v ../myQualFile.qual ../myMumFile

Every Script has a description of what it does and how/when to use it in its source code. The list all the modifiers that the script supports and what they do is also included. A similar help menu can be viewed by calling the script with no arguments. For example, typing the following,

python sumqual.py

would cause a help menu to be printed to the screen.

Python Scripts

A pipeline for combining the free aligner NUCmer and the free short read assembler YASRA so full alignments can be made with one command. Alignreads uses the following scripts from the Liston lab: runyasra.py, sumqual.py, and qualtofa.py. It also uses yasra and its binaries, including lastz. It must be possible for the python interpreter to find these scripts to run alignreads; this can be done saving copies of scripts in the Python26 folder, your bin folder, or modifying your .chsrc file to search where they are saved on your system (nessesary if lastz binaries cannot be found). alignreads preserves almost all of the functionality and output of the five programs it uses, so there are many options (over 40). Because there are so many modifiers, the help menu reached by not providing arguments only has what are expected to be the options used most often; to get all of the options type 'python alignreads.py -H' or 'python alignreads.py --advanced-help'. Since there are many files associated with the alignment, the output is a folder with numerous files organized into subfolders. alignreads.py can also start the pipeline from a folder produced by a previous run of alignreads.py or runyasra.py. In that case, the output is saved in the input folder and separate subfolders are created for each alignment. A more complete discription of alignreads can be found here: alignreads.py README.

A FASTA file containing reads, and A FASTA file containing a reference OR a folder from a previous run of alignreads or runyasra.

A folder containing all of the output from every part of the pipeline organized in subfolders based on each programs' output.

Converts a file containing a list of annotations, as well as each of their respective start and stop indices, into a file containing a list of base indices, each followed by any annotations that apply at that specific base. Each line of the input file is expected to be whitespace-delimitated, however if your annotations have spaces in them, the script can be made to enforce tab-delimitation. The output file is always tab-delaminated.

Finds base differences between multiple aligned sequences in a single FASTA file and output a tab-delimitated txt file containing the base values for all the sequences at the index where the difference occurred. The script has many modifiers that change what is considered a difference.

Performs and outputs various statistical tests for each contig in a GSS basepile output. it is assumed that the information for each contig is 1000 bases long. The following statistics are outputted in a tab-delimitated list for each contig by the script:

Reference Match Length: The index of the last known base (i.e. not 'N')

Calculates statistics for each contig in a Tablet output file and outputs them to a tab-delimitated '.txt' file following the name of their respective contig. The statistics calculated are: number of coverage values, average coverage depth, percent of bases with a coverage greater than zero, and maximum coverage depth. coveragestats.py requires that contig names have at least one non-numerical character.

Creates a MUMmer-style output from a FASTA file of aligned sequences. The first line is always considered the reference and is not included in the output. The start index in terms of the reference, and in terms of the contig, as well as the length are recorded for each matching section of the contig.

Removes all of the gaps (i.e. '-') that are common (i.e. at the same index) to all of the sequences in an aligned FASTA file. By default, the first sequence is considered the reference and is excluded from the analysis, but the number of sequences that are treated as such can be changed.

FASTA file containing two or more aligned sequences.

FASTA file same number of sequences as the input file but, with gaps removed

A script used in conjunction with the free aligners NUCmer and the free short read assembler YASRA. Creates a file with a similar to the format to that of the .qual file YASRA outputs, except each base can have multiple sets of quality values. The format preserves all of the alignment, indel, quality, and reference data from the input files. Uses a .qual file containing the quality scores of multiple contigs and the output file of NUCmer to make a "consensus" .qual file, which contains the quality values in terms of the reference. Sumqual's output can be converted to a fasta format using qualtofa.py. td>

FASTA file containing the sequence of multiple contigs

NUCmer output file

Reference file used with Nucmer

similar to .qual input file, except each base can hold the information from more than one contig

Selectively extracts the sequence from a quality file and outputs it to a FASTA file. It is designed to be used in conjunction with sumqual.py and accepts its consensus-style output, which preserves all of the alignment, quality and reference information. Conflicting bases on overlapping matches from a consensus-style output are condensed into IUPAC ambiguity codes, or gaps can be added to the reference to accommodate repeated or unmatched sequence if a option is used. It has several masking and trimming options.