Module Expr Str Import alias Import alias identifier Import alias identifier Import alias FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Call NameLoad NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Str Str AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If UnaryOpNot NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword SubscriptLoad Call NameLoad Index Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad Str If UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad Str Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr
N/A N/A fastq2N.py -
=============================================

:Author: Andreas Heger
:Release: $Id$
:Date: |today|
:Tags: Python

Purpose
-------

.. todo::

   This script takes as input a fastq file and converts a position
   (base) to an N call. This is to keep all reads in line should there
   be an overrepresentation of N calls in any samples.

Usage
-----

Example::

   python fastq2N.py --help

Type::

   python fastq2N.py --help

for command line help.

Command line options
--------------------

 N/A sys N/A CGAT.Experiment E N/A CGAT.Fastq Fastq N/A gzip replace N/A N/A fastqfile baseToReplace N/A N/A N/A replaces the specified base with N N/A outf N/A N/A gzip open N/A replaced_ fastqfile w N/A fastq N/A N/A gzip open fastqfile N/A iterator N/A N/A Fastq iterate fastq N/A record iterator N/A N/A x N/A list N/A record seq N/A N/A x N/A N/A int baseToReplace N N/A N/A record seq N/A N/A join x N/A N/A N/A outf write N/A N/A N/A N/A N/A N/A N/A N/A N/A @ N/A record identifier N/A record seq + N/A record identifier N/A record quals N/A main N/A N/A argv N/A None N/A N/A script main.

    parses command line options in sys.argv, unless *argv* is given.
     N/A N/A argv N/A N/A argv N/A sys argv N/A parser N/A N/A E OptionParser version %prog version: $Id: cgat_script_template.py 2871 2010-03-03 10:20:44Z andreas $ usage N/A N/A globals N/A __doc__ N/A N/A N/A parser add_option -i --infile dest infile type string help Input filename N/A N/A N/A parser add_option -b --base-position dest base_position help base position in which to replace with an N N/A N/A options args N/A N/A E Start parser argv argv N/A N/A N/A options infile N/A N/A N/A ValueError need to specify input fastq file N/A N/A N/A options base_position N/A N/A N/A ValueError need to specify which base to convert N/A N/A replace N/A options infile N/A options base_position N/A N/A N/A E Stop N/A N/A N/A __name__ __main__ N/A N/A N/A N/A sys exit N/A main N/A sys argv