Mercurial > repos > artbio > cherry_pick_fasta
annotate cherry_pick_fasta.py @ 1:ea8fde9c6f82 draft
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
author | artbio |
---|---|
date | Wed, 09 Oct 2019 18:48:17 -0400 |
parents | e3aee4ba49c6 |
children | 321cad0eb507 |
rev | line source |
---|---|
0
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
1 #!/usr/bin/env python |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
2 # -*- coding: utf-8 -*- |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
3 """ |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
4 Chery pick of fasta sequences satisfying a query string in their header/name |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
5 """ |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
6 |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
7 import argparse |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
8 |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
9 |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
10 def Parser(): |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
11 the_parser = argparse.ArgumentParser( |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
12 description="Cherry pick fasta sequences") |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
13 the_parser.add_argument('--input', action="store", type=str, |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
14 help="input fasta file") |
1
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
15 the_parser.add_argument('--searchfor', action="store", type=str, |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
16 help="with, without, or withlist, withoutlist") |
0
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
17 the_parser.add_argument('--query-string', dest="query_string", |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
18 action="store", type=str, |
1
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
19 help="headers containing the string will be \ |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
20 extracted or excluded as well as the \ |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
21 corresponding sequence") |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
22 the_parser.add_argument('--query-file', dest="query_file", |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
23 action="store", type=str, |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
24 help="headers containing any of the strings provided in the \ |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
25 text file (1 string per line) will be \ |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
26 extracted or excluded as well as the \ |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
27 corresponding sequence") |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
28 |
0
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
29 the_parser.add_argument( |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
30 '--output', action="store", type=str, help="output fasta file") |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
31 args = the_parser.parse_args() |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
32 return args |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
33 |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
34 |
1
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
35 def parse_fasta_with(query, FastaListe): |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
36 if not isinstance(query, list): |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
37 query = [query] |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
38 accumulator = [] |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
39 for sequence in FastaListe: |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
40 for string in query: |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
41 if string in sequence: |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
42 accumulator.append(sequence) |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
43 continue |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
44 return accumulator |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
45 |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
46 |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
47 def complement_fasta(fullfasta, subfasta): |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
48 return list(set(fullfasta) - set(subfasta)) |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
49 |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
50 |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
51 def getquerylist(file): |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
52 querylist = [] |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
53 for line in open(file, 'r'): |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
54 querylist.append(line.rstrip()) |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
55 return querylist |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
56 |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
57 |
0
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
58 def __main__(): |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
59 """ main function """ |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
60 args = Parser() |
1
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
61 searchterm = args.query_string |
0
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
62 CrudeFasta = open(args.input, "r").read() |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
63 Output = open(args.output, "w") |
1
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
64 FastaListe = CrudeFasta.split(">")[1:] |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
65 if args.query_string: |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
66 if args.searchfor == 'with': |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
67 contList = parse_fasta_with(searchterm, FastaListe) |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
68 contFasta = ">%s" % ">".join(contList) |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
69 Output.write(contFasta) |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
70 elif args.searchfor == 'without': |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
71 notcontList = complement_fasta(FastaListe, |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
72 parse_fasta_with(searchterm, |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
73 FastaListe)) |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
74 notcontFasta = ">%s" % ">".join(notcontList) |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
75 Output.write(notcontFasta) |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
76 if args.query_file: |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
77 searchlist = getquerylist(args.query_file) |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
78 if args.searchfor == 'with': |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
79 contList = parse_fasta_with(searchlist, FastaListe) |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
80 contFasta = ">%s" % ">".join(contList) |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
81 Output.write(contFasta) |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
82 elif args.searchfor == 'without': |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
83 notcontList = complement_fasta(FastaListe, parse_fasta_with( |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
84 searchlist, FastaListe)) |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
85 notcontFasta = ">%s" % ">".join(notcontList) |
ea8fde9c6f82
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit f527add7e7bace30b8bc67524ff1da1bf920ec29"
artbio
parents:
0
diff
changeset
|
86 Output.write(notcontFasta) |
0
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
87 Output.close() |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
88 |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
89 |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
90 if __name__ == "__main__": |
e3aee4ba49c6
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit a5e865d017e0434dae013565929ad5e6e5129fd3
artbio
parents:
diff
changeset
|
91 __main__() |