annotate copy_reference.py @ 9:480f01788210 draft default tip

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