Skip to content
Snippets Groups Projects
Commit f8aefb82 authored by Mate Balajti's avatar Mate Balajti
Browse files

refactor: update main.py with TSL support

parent b23e7f3f
No related branches found
No related tags found
2 merge requests!48refactor: setup.py, CI,!47feat: add support for reassigned Transcript Support Level
......@@ -12,7 +12,7 @@ URL = ('https://git.scicore.unibas.ch/zavolan_group/'
setup(
name='transcript-structure-generator',
version='0.1.0',
version='0.2.0',
url=URL,
license='MIT',
author='Larissa Glass, Michael Zimmermann, Andri Fraenkl',
......
......@@ -55,7 +55,7 @@ def filter_df(gtf_df: pd.DataFrame, transcripts: list) -> pd.DataFrame:
transcripts = []
df_filter = gtf_df[
(gtf_df["feature"] == "exon")
& (gtf_df["free_text"].str.contains('transcript_support_level "1"'))
& (gtf_df["free_text"].str.contains('transcript_support_level "1'))
]
if len(transcripts) > 0:
df_filter = df_filter[df_filter["free_text"].str.contains(
......@@ -316,16 +316,15 @@ class TranscriptGenerator:
strands = transcript_df["strand"].unique()
if len(transcript_df) == 0:
LOG.warning(
"Transcript %s can't be sampled. \
Annotation is missing", transcript_id
"Transcript %s can't be sampled. "
"Annotation is missing or TSL is not 1.", transcript_id
)
instance = None
elif len(strands) > 1:
LOG.warning(
"Transcript %s can't be sampled. Transcript generator \
is not implemented for transcripts with \
exons annotated on different strands",
transcript_id,
"Transcript %s can't be sampled. Transcript generator is "
"not implemented for transcripts with exons annotated on "
"different strands", transcript_id,
)
instance = None
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment