annotate copy_reference.py @ 5:405ed9ad53ab draft

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