Skip to content

Commit

Permalink
support old isoquant runs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewprzh committed Aug 1, 2024
1 parent c06c93f commit ac2918d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/post_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,22 @@ def parse_input_gtf(self):
"""Parses the GTF file using gffutils to build a detailed dictionary of genes, transcripts, and exons."""
gene_dict = {}
if not self.config.genedb_filename:
raise FileNotFoundError("IsoQuant annotation DB file is missing.")
# convert GFT to DB if we use previous IsoQuant runs
# remove this functionality later
tmp_file = tempfile.NamedTemporaryFile(suffix=".db")
self.config.genedb_filename = tmp_file.name
input_gtf_path = self.config.input_gtf
gffutils.create_db(
input_gtf_path,
dbfn=self.config.genedb_filename,
force=True,
keep_order=True,
merge_strategy="merge",
sort_attribute_values=True,
disable_infer_genes=True,
disable_infer_transcripts=True,
)
# raise FileNotFoundError("IsoQuant annotation DB file is missing.")

try:
# Create a temporary database
Expand Down

0 comments on commit ac2918d

Please sign in to comment.