Skip to content

Gtf creation #49

Merged
merged 2 commits into from
Jan 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,4 @@ venv.bak/

# mypy
.mypy_cache/

Würde bin/3.1_create_gtf/data/ löschen
Würde data/ löschen
/bin/3.1_create_gtf/data/
26 changes: 15 additions & 11 deletions bin/3.1_create_gtf/Modules/ucsc/ucsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,21 @@ def read_gff_to_gtf(self):
with open(self.output, 'r') as csvfile:
tsvreader = csv.reader(csvfile, delimiter='\t')
for row in tsvreader:
sequence = []
sequence.append(row[0])
sequence.append("UCSC")
sequence.append(row[3].lower().replace(' ', '_'))
sequence.append(row[1])
sequence.append(row[2])
sequence.append(".")
sequence.append(row[5])
sequence.append(".")
sequence.append('; '.join([self.find_ID(''.join(row[11:])), 'activity \"'+", ".join(self.get_activity(''.join(row[11:]))) + '"'])+";")
gtf_lines.append(sequence)
if row[9] not in ["region", "sequence_feature",
"CAAT_signal", "stem_loop",
"sequence_secondary_structure"]:

sequence = []
sequence.append(row[0])
sequence.append("UCSC")
sequence.append(row[9].lower().replace(' ', '_'))
sequence.append(row[1])
sequence.append(row[2])
sequence.append(".")
sequence.append(row[5])
sequence.append(".")
sequence.append('; '.join([self.find_ID(''.join(row[11:])), 'activity \"'+", ".join(self.get_activity(''.join(row[11:]))) + '"'])+";")
gtf_lines.append(sequence)

return gtf_lines

Expand Down
2 changes: 2 additions & 0 deletions bin/3.1_create_gtf/RegGTFExtractor.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python

"""

RegGTFExtractor.py extracts regulatory-data from Ensembl and UCSC databases
Expand Down