-
Notifications
You must be signed in to change notification settings - Fork 1
/
copy_fasta_from_encode.py
45 lines (25 loc) · 1.18 KB
/
copy_fasta_from_encode.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import os, glob, multiprocessing, time, itertools
import argparse
def parse_args():
parser = argparse.ArgumentParser(description='')
requiredArgs = parser.add_argument_group("Required Arguments")
requiredArgs.add_argument('-n', '--run_name',
dest='run_name',
required=True,
help='name of the analysis (round1, round2...)'
)
requiredArgs.add_argument('-p', '--part_name',
dest='part_name',
required=True,
help='just the number: 1, 2, 3...'
)
return parser.parse_args()
def main():
args = parse_args()
# remove previous vs2 run
os.system("rm -rf config.yaml *.tsv *.fasta iter-0 log final-viral-combined.fa")
# copy .fasta part file
part_file = f"/home/danielc/projects/Bas_phages/5_nr_screening/4_merged_ncbi_crassvirales/3_bacterial/{args.run_name}/3_vs2/0_fasta/nr_contigs.fasta.split/nr_contigs.part_00{args.part_name}.fasta"
os.system(f"cp {part_file} .")
if __name__ == "__main__":
main()