plastid.bin.make_wiggle module

Create genome browser tracks from read alignments, using mapping rules to extract the biology of interest (e.g. ribosomal P-sites, et c) from the alignments.

Output files

Tracks can be output in wiggle and bedGraph formats. Because these formats are unstranded, two files are created:

Counts at each position for the plus/forward strand of each chromosome
Counts at each position for the minus/reverse strand of each chromosome

where OUTBASE is given by the user.

See also

Read mapping functions
Explanations of mapping rules and why they can be useful
For lists of mapping rules and their parameters

Command-line arguments

Optional arguments

Argument Description
-h, --help show this help message and exit
-o  FILENAME, --out  FILENAME Base name for output files
--window_size  N Size of nucleotides to fetch at once for export. Large values are faster but require more memory (Default: 100000)

Warning/error options

Argument Description
-q, --quiet Suppress all warning messages. Cannot use with ‘-v’.
-v, --verbose Increase verbosity. With ‘-v’, show every warning. With ‘-vv’, turn warnings into exceptions. Cannot use with ‘-q’. (Default: show each type of warning once)

Count & alignment file options

Open alignment or count files and optionally set mapping rules

Argument Description
--count_files  COUNT_FILES [COUNT_FILES ...] One or more count or alignment file(s) from a single sample or set of samples to be pooled.
--countfile_format  {BAM,bigwig,bowtie,wiggle} Format of file containing alignments or counts (Default: BAM)
--normalize Whether counts should be normalized to counts per million (usually not. default: False)
--sum  SUM Sum used in normalization of counts and RPKM/RPNT calculations (Default: total mapped reads/counts in dataset)
--min_length  N Minimum read length required to be included (BAM & bowtie files only. Default: 25)
--max_length  N Maximum read length permitted to be included (BAM & bowtie files only. Default: 100)
--maxmem  MAXMEM Maximum desired memory footprint in MB to devote to BigBed/BigWig files. May be exceeded by large queries. (Default: 0, No maximum)
--big_genome Use slower but memory-efficient implementation for big genomes or for memory-limited computers. For wiggle & bowtie files only.

Alignment mapping functions (bam & bowtie files only)

For BAM or bowtie files, one of the mutually exclusive read mapping functions is required:

Argument Description
--fiveprime_variable Map read alignment to a variable offset from 5’ position of read, with offset determined by read length. Requires –offset below
--fiveprime Map read alignment to 5’ position.
--threeprime Map read alignment to 3’ position
--center Subtract N positions from each end of read, and add 1/(length-N), to each remaining position, where N is specified by –nibble

Filtering and alignment mapping options

The remaining arguments are optional and affect the behavior of specific mapping functions:

Argument Description
--offset  OFFSET For –fiveprime or –threeprime, provide an integer representing the offset into the read, starting from either the 5’ or 3’ end, at which data should be plotted. For –fiveprime_variable, provide the filename of a two-column tab-delimited text file, in which first column represents read length or the special keyword ‘default’, and the second column represents the offset from the five prime end of that read length at which the read should be mapped. (Default: 0)
--nibble  N For use with –center only. nt to remove from each end of read before mapping (Default: 0)

Browser track options

Argument Description
--color  COLOR An RGB hex string (‘#NNNNNN’, N in [0-9,A-F]) specifying the track color.
-t  TRACK_NAME, --track_name  TRACK_NAME Name to give browser track
--output_format  {bedgraph,variable_step} Format of output file (Default: bedgraph)

Script contents

plastid.bin.make_wiggle.main(argv=['-T', '-E', '-b', 'readthedocs', '-d', '_build/doctrees-readthedocs', '-D', 'language=en', '.', '_build/html'])[source]

Command-line program

argv : list, optional

A list of command-line arguments, which will be processed as if the script were called from the command line if main() is called directly.

Default: sys.argv[1:] (actually command-line arguments)