|
177 | 177 | flag). Commented BLAST tabular files may be parsed, indexed, or written using
|
178 | 178 | the keyword argument 'comments' set to True:
|
179 | 179 |
|
180 |
| - # blast-tab defaults to parsing uncommented files |
| 180 | + >>> # blast-tab defaults to parsing uncommented files |
181 | 181 | >>> from Bio import SearchIO
|
182 | 182 | >>> uncommented = 'Blast/tab_2226_tblastn_004.txt'
|
183 | 183 | >>> qresult = SearchIO.read(uncommented, 'blast-tab')
|
184 | 184 | >>> qresult
|
185 | 185 | QueryResult(id='gi|11464971:4-101', 5 hits)
|
186 | 186 |
|
187 |
| - # set the keyword argument to parse commented files |
| 187 | + >>> # set the keyword argument to parse commented files |
188 | 188 | >>> commented = 'Blast/tab_2226_tblastn_008.txt'
|
189 | 189 | >>> qresult = SearchIO.read(commented, 'blast-tab', comments=True)
|
190 | 190 | >>> qresult
|
|
200 | 200 | query sequence ID. These names may be passed either as a Python list or as a
|
201 | 201 | space-separated strings.
|
202 | 202 |
|
203 |
| - # pass the custom column names as a Python list |
| 203 | + >>> # pass the custom column names as a Python list |
204 | 204 | >>> fname = 'Blast/tab_2226_tblastn_009.txt'
|
205 | 205 | >>> custom_fields = ['qseqid', 'sseqid']
|
206 | 206 | >>> qresult = next(SearchIO.parse(fname, 'blast-tab', fields=custom_fields))
|
207 | 207 | >>> qresult
|
208 | 208 | QueryResult(id='gi|16080617|ref|NP_391444.1|', 3 hits)
|
209 | 209 |
|
210 |
| - # pass the custom column names as a space-separated string |
| 210 | + >>> # pass the custom column names as a space-separated string |
211 | 211 | >>> fname = 'Blast/tab_2226_tblastn_009.txt'
|
212 | 212 | >>> custom_fields = 'qseqid sseqid'
|
213 | 213 | >>> qresult = next(SearchIO.parse(fname, 'blast-tab', fields=custom_fields))
|
|
0 commit comments