-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecombinationPipeline.py
executable file
·53 lines (39 loc) · 1.54 KB
/
recombinationPipeline.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
46
47
48
49
50
51
52
53
#!/usr/bin/env python
from filterCandidates import *
from getCandidates import *
from bowtieFastqs import *
if __name__=="__main__":
# ---- Play Nice with Unix
signal.signal(signal.SIGPIPE,signal.SIG_DFL)
# ---- Prepping for Run
csv_files = [x for x in os.listdir(os.getcwd()) if ".csv" in x]
if len(csv_files) == 0:
print("\nCouldn't Find a .csv to work against!\n")
sys.exit(1)
elif len(csv_files) > 1:
print("Found too many csv files in directory. Only expected one!")
sys.exit(1)
else:
csv_file = csv_files[0]
print("Using %s as the Gene Pairs csv" % (csv_file))
# ---- Script start
# ---- Options for Bowtie
genome_basename = "tair10"
options = "--local -p 3"
indexes_folder = "/home/shelly/bin/bowtie2/INDEXES/"
# ---- bowtieFastqs.py
bowtieFastqs = bowtieFastqs()
bowtieFastqs.bowtie(options=options,indexes_folder=indexes_folder,genome_basename=genome_basename)
# ---- getCandidates.py
loxData = loxData()
loxData.slim_and_clean_sam_files(no_filter=False,harsh_filter=True)
#loxData.align2gff()
loxData.getCandidateReads()
# ---- filterCandidates.py
# NOTE: If modify accession numbers is False the script will still check the
# the closest accession number matches. It just won't modify genes to the
# closest one.
filterCandidates = filterData(csv_file)
filterCandidates.compareCandidateReads2Predicted(modify_accession_numbers=False)
# ---- CleanUp
# loxData.cleanUp()