annotate copy_reference.py @ 3:fb4975b507c6 draft

"planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
author iuc
date Fri, 20 Aug 2021 21:04:17 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
1 import argparse
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
2 import os
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
3 import shutil
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
4
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
5 from BioExt.references import cov2, hxb2, nl4_3
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
6
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
7
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
8 references = {
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
9 'HXB2_env': hxb2.env,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
10 'HXB2_gag': hxb2.gag,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
11 'HXB2_int': hxb2.int,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
12 'HXB2_nef': hxb2.nef,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
13 'HXB2_pol': hxb2.pol,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
14 'HXB2_pr': hxb2.pr,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
15 'HXB2_prrt': hxb2.prrt,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
16 'HXB2_rev': hxb2.rev,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
17 'HXB2_rt': hxb2.rt,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
18 'HXB2_tat': hxb2.tat,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
19 'HXB2_vif': hxb2.vif,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
20 'HXB2_vpr': hxb2.vpr,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
21 'HXB2_vpu': hxb2.vpu,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
22 'NL4-3_prrt': nl4_3.prrt,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
23 'CoV2-3C': cov2.threeC,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
24 'CoV2-E': cov2.E,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
25 'CoV2-endornase': cov2.endornase,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
26 'CoV2-exonuclease': cov2.exonuclease,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
27 'CoV2-helicase': cov2.helicase,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
28 'CoV2-leader': cov2.leader,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
29 'CoV2-methyltransferase': cov2.methyltransferase,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
30 'CoV2-M': cov2.M,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
31 'CoV2-N': cov2.N,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
32 'CoV2-nsp10': cov2.nsp10,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
33 'CoV2-nsp2': cov2.nsp2,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
34 'CoV2-nsp3': cov2.nsp3,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
35 'CoV2-nsp4': cov2.nsp4,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
36 'CoV2-nsp6': cov2.nsp6,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
37 'CoV2-nsp7': cov2.nsp7,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
38 'CoV2-nsp8': cov2.nsp8,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
39 'CoV2-nsp9': cov2.nsp9,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
40 'CoV2-ORF10': cov2.ORF10,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
41 'CoV2-ORF1a': cov2.ORF1a,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
42 'CoV2-ORF1b': cov2.ORF1b,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
43 'CoV2-ORF3a': cov2.ORF3a,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
44 'CoV2-ORF5': cov2.ORF5,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
45 'CoV2-ORF6': cov2.ORF6,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
46 'CoV2-ORF7a': cov2.ORF7a,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
47 'CoV2-ORF7b': cov2.ORF7b,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
48 'CoV2-ORF8': cov2.ORF8,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
49 'CoV2-RdRp': cov2.RdRp,
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
50 'CoV2-S': cov2.S
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
51 }
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
52
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
53 parser = argparse.ArgumentParser()
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
54 parser.add_argument('--reference', dest='reference', action='store', type=str)
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
55 parser.add_argument('--dataset', dest='dataset', action='store', type=str)
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
56 args = parser.parse_args()
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
57 reference = os.path.abspath(references[args.reference]._seqpath)
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
58
fb4975b507c6 "planemo upload for repository https://github.com/davebx/bioext-gx/ commit af3bfbbd3f1236bf96a25bcb8483f2889295ec0c"
iuc
parents:
diff changeset
59 shutil.copy(reference, os.path.abspath(args.dataset))