1 """Definitions for interacting with Blast related applications.
2 """
3 from Bio import Application
4 from Bio.Application import _Option
5
7 """Create a commandline for the fasta program from NCBI.
8
9 """
10
11 - def __init__(self, fastacmd = "fastacmd"):
12 Application.AbstractCommandline.__init__(self)
13
14 self.program_name = fastacmd
15
16 self.parameters = \
17 [
18 _Option(["-d", "database"], ["input"], None, 1,
19 "The database to retrieve from."),
20 _Option(["-s", "search_string"], ["input"], None, 1,
21 "The id to search for.")
22 ]
23
25 """Create a commandline for the blastall program from NCBI.
26
27 XXX This could use more checking for valid paramters to the program.
28 """
29 - def __init__(self, blastcmd = "blastall"):
30 Application.AbstractCommandline.__init__(self)
31
32 self.program_name = blastcmd
33
34 self.parameters = \
35 [
36 _Option(["-M", "matrix"], ["input"], None, 0,
37 "Matrix to use"),
38 _Option(["-G", "gap_open"], ["input"], None, 0,
39 "Gap open penalty"),
40 _Option(["-E", "gap_extend"], ["input"], None, 0,
41 "Gap extension penalty"),
42 _Option(["-A", "window_size"], ["input"], None, 0,
43 "Multiple hits window size"),
44 _Option(["-j", "npasses"], ["input"], None, 0,
45 "Number of passes"),
46 _Option(["-p", "passes"], ["input"], None, 0,
47 "Hits/passes. Integer 0-2."),
48
49
50 _Option(["-g", "gapped"], ["input"], None, 0,
51 "Whether to do a gapped alignment. T/F"),
52 _Option(["-e", "expectation"], ["input"], None, 0,
53 "Expectation value cutoff."),
54 _Option(["-W", "wordsize"], ["input"], None, 0,
55 "Word size"),
56 _Option(["-K", "keep_hits"], ["input"], None, 0,
57 " Number of best hits from a region to keep."),
58 _Option(["-X", "xdrop"], ["input"], None, 0,
59 "Dropoff value (bits) for gapped alignments."),
60 _Option(["-f", "hit_extend"], ["input"], None, 0,
61 "Threshold for extending hits."),
62 _Option(["-L", "region_length"], ["input"], None, 0,
63 "Length of region used to judge hits."),
64 _Option(["-Z", "db_length"], ["input"], None, 0,
65 "Effective database length."),
66 _Option(["-Y", "search_length"], ["input"], None, 0,
67 "Effective length of search space."),
68 _Option(["-N", "nbits_gapping"], ["input"], None, 0,
69 "Number of bits to trigger gapping."),
70 _Option(["-c", "pseudocounts"], ["input"], None, 0,
71 "Pseudocounts constants for multiple passes."),
72 _Option(["-Z", "xdrop_final"], ["input"], None, 0,
73 "X dropoff for final gapped alignment."),
74 _Option(["-y", "xdrop_extension"], ["input"], None, 0,
75 "Dropoff for blast extensions."),
76 _Option(["-h", "model_threshold"], ["input"], None, 0,
77 "E-value threshold to include in multipass model."),
78 _Option(["-S", "required_start"], ["input"], None, 0,
79 "Start of required region in query."),
80 _Option(["-H", "required_end"], ["input"], None, 0,
81 "End of required region in query."),
82
83
84 _Option(["-p", "program"], ["input"], None, 1,
85 "The blast program to use."),
86 _Option(["-d", "database"], ["input"], None, 1,
87 "The database to BLAST against."),
88 _Option(["-i", "infile"], ["input", "file"], None, 1,
89 "The sequence to search with."),
90 _Option(["-F", "filter"], ["input"], None, 0,
91 "Filter query sequence with SEG? T/F"),
92 _Option(["-J", "believe_query"], ["input"], None, 0,
93 "Believe the query defline? T/F"),
94 _Option(["-a", "nprocessors"], ["input"], None, 0,
95 "Number of processors to use."),
96
97
98 _Option(["-T", "html"], ["input"], None, 0,
99 "Produce HTML output? T/F"),
100 _Option(["-v", "descriptions"], ["input"], None, 0,
101 "Number of one-line descriptions."),
102 _Option(["-b", "alignments"], ["input"], None, 0,
103 "Number of alignments."),
104 _Option(["-m", "align_view"], ["input"], None, 0,
105 "Alignment view. Integer 0-6."),
106 _Option(["-I", "show_gi"], ["input"], None, 0,
107 "Show GI's in deflines? T/F"),
108 _Option(["-O", "seqalign_file"], ["output", "file"], None, 0,
109 "seqalign file to output."),
110 _Option(["-o", "align_outfile"], ["output", "file"], None, 1,
111 "Output file for alignment."),
112 _Option(["-C", "checkpoint_outfile"], ["output", "file"], None, 0,
113 "Output file for PSI-BLAST checkpointing."),
114 _Option(["-R", "restart_infile"], ["input", "file"], None, 0,
115 "Input file for PSI-BLAST restart."),
116 _Option(["-k", "hit_infile"], ["input", "file"], None, 0,
117 "Hit file for PHI-BLAST."),
118 _Option(["-Q", "matrix_outfile"], ["output", "file"], None, 0,
119 "Output file for PSI-BLAST matrix in ASCII."),
120 _Option(["-B", "align_infile"], ["input", "file"], None, 0,
121 "Input alignment file for PSI-BLAST restart.")
122 ]
123