This repository contains a collection of scripts for various tasks in bioinformatics. They were developed independently for use in various data analysis pipelines.
All scripts in bioscripts are designed to be executed as stand-alone command-line programs in a Python 2.7 environment. If your Python executable is not in a standard location, please adjust the first line (starting with #!) accordingly.
All scripts require the Script.py and Utils.py files, that should therefore be located in the same directory as the script you are executing. In addition:
- bisconv.py and regionscount.py require the pysam library;
- methreport.py and methylfilter.py require the SeqIO module from BioPython.
- dmaptools.py requires scipy.
- genes.py requires the sqlite3 module.
All scripts in bioscripts accept the following command-line arguments:
Argument | Description |
---|---|
-h, --help | Print usage message. |
-v, --version | Print version number. |
-E [n] | Decode error code. If called with an error code n, prints the corresponding error message. If called without n, displays all error codes for this script with the associated error message. |
The -E argument is designed for automated error handling in scripts. After calling a script (e.g. prog.py), check the return value (in the $? variable), and if it is not zero, print the corresponding error message with:
prog.py -E $?
The following table lists all scripts in this package with a short description of their purpose.
Name | Description |
---|---|
bamToWig.py | Convert BAM file to WIG track for the UCSC genome browser. |
bisconv.py | Extract aligned reads from BAM file based on conversion strand. |
chromCoverage.py | Report per-chromosome coverage. |
compareIntrons.py | Analyze intron retention. |
countseqs.py | Count sequences in fasta/fastq[.gz] files. |
demux.py | Separate reads in fastq files by barcode. |
dmaptools.py | Utilities for methylation analysis. |
genes.py | Create and manipulate gene databases. |
mergeCols.py | Merge columns from multiple files. |
methreport.py | Report methylation rate at CG and GC positions. |
methylfilter.py | Separate sequences by average methylation. |
pileupToBED.py | Convert a samtools pileup to a BED file. |
regionsCount.py | Compute coverage from BAM file in specified regions. |
removeN.py | Remove Ns from sequences in FASTA file. |
rnaseqtools.py | Utilities for RNA-seq analysis. |