Back to index

python-biopython  1.60
_AlignAce.py
Go to the documentation of this file.
00001 # Copyright 2003-2009 by Bartek Wilczynski.  All rights reserved.
00002 # Revisions copyright 2009 by Peter Cock.
00003 # This code is part of the Biopython distribution and governed by its
00004 # license.  Please see the LICENSE file that should have been included
00005 # as part of this package.
00006 """This module provides code to work with the standalone version of AlignACE, 
00007 for motif search in DNA sequences.
00008 
00009 AlignACE homepage:
00010 
00011 http://atlas.med.harvard.edu/
00012 
00013 AlignACE Citations:
00014 
00015 Computational identification of cis-regulatory elements associated with 
00016 groups of functionally related genes in Saccharomyces cerevisiae, 
00017 Hughes, JD, Estep, PW, Tavazoie S, & GM Church, Journal of Molecular 
00018 Biology 2000 Mar 10;296(5):1205-14.
00019 
00020 Finding DNA Regulatory Motifs within Unaligned Non-Coding Sequences 
00021 Clustered by Whole-Genome mRNA Quantitation, 
00022 Roth, FR, Hughes, JD, Estep, PE & GM Church, Nature Biotechnology 
00023 1998 Oct;16(10):939-45. 
00024 
00025 """
00026 from Bio.Application import AbstractCommandline, _Option, _Argument
00027 
00028 
00029 class AlignAceCommandline(AbstractCommandline):
00030     """Create a commandline for the AlignAce program.
00031 
00032     XXX This could use more checking for valid paramters to the program.
00033     """
00034     def __init__(self, cmd="AlignACE", **kwargs):
00035         self.parameters = \
00036           [
00037             _Option(["-i","input"],["input"],lambda x : x.__class__== str,1,
00038                     "Input Sequence file in FASTA format."),
00039             
00040             _Option(["-numcols","numcols"],["input"],lambda x : x.__class__== int,0,
00041                     "Number of columns to align"),
00042 
00043             _Option(["-expect","expect"],["input"],lambda x : x.__class__== int,0,
00044                     "number of sites expected in model "),
00045             
00046             _Option(["-gcback","gcback"],["input"],lambda x : x.__class__== float,0,
00047                     "background fractional GC content of input sequence"),
00048             
00049             _Option(["-minpass","minpass"],["input"],lambda x : x.__class__== int,0,
00050                     "minimum number of non-improved passes in phase 1"),
00051             
00052             _Option(["-seed","seed"],["input"],lambda x : x.__class__== int,0,
00053                     "set seed for random number generator (time)"),
00054             
00055             _Option(["-undersample","undersample"],["input"],lambda x : x.__class__== int,0,
00056                     "possible sites / (expect * numcols * seedings)"),
00057 
00058             _Option(["-oversample","oversample"],["input"],lambda x : x.__class__== int,0,
00059                     "1/undersample"),
00060           ]
00061         AbstractCommandline.__init__(self, cmd, **kwargs)
00062 
00063 
00064 class CompareAceCommandline(AbstractCommandline):
00065     """Create a commandline for the CompareAce program.
00066 
00067     XXX This could use more checking for valid paramters to the program.
00068     """
00069     def __init__(self, cmd="CompareACE", **kwargs):
00070         import os.path
00071         self.parameters = \
00072           [
00073             _Argument(["motif1"],["input","file"], os.path.exists,1,"name of file containing motif 1"),
00074             _Argument(["motif2"],["input","file"], os.path.exists,1,"name of file containing motif 2"),
00075           ]
00076         AbstractCommandline.__init__(self, cmd, **kwargs)