-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mbarba/logging gff #204
Mbarba/logging gff #204
Conversation
Co-authored-by: J. Alvarez-Jarreta <jalvarez@ebi.ac.uk>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of minor edits, but looks good 👍
@@ -441,7 +444,7 @@ def _normalize_transcripts(self, gene: SeqFeature, fail_types) -> SeqFeature: | |||
message = ( | |||
f"Unrecognized transcript type: {transcript.type}" f" for {transcript.id} ({gene.id})" | |||
) | |||
print(message) | |||
logging.warning(message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging.warning(message) | |
logging.warning( | |
f"Unrecognized transcript type: {transcript.type}" f" for {transcript.id} ({gene.id})" | |
) |
And remove the previous message
declaration?
@@ -515,7 +518,7 @@ def _normalize_transcript_subfeatures( | |||
f"Unrecognized exon type for {feat.type}: {feat.id}" | |||
f" (for transcript {transcript.id} of type {transcript.type})" | |||
) | |||
print(message) | |||
logging.warning(message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same suggestion as before:
logging.warning(message) | |
logging.warning(( | |
f"Unrecognized exon type for {feat.type}: {feat.id}" | |
f" (for transcript {transcript.id} of type {transcript.type})" | |
)) |
args = parser.parse_args() | ||
init_logging(args.log_level, args.log_file, args.log_file_level) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
init_logging(args.log_level, args.log_file, args.log_file_level) | |
init_logging_with_args(args) |
@@ -35,6 +36,7 @@ | |||
|
|||
from ensembl.io.genomio.gff3.extract_annotation import FunctionalAnnotations | |||
from ensembl.utils.argparse import ArgumentParser | |||
from ensembl.utils.logging import init_logging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from ensembl.utils.logging import init_logging | |
from ensembl.utils.logging import init_logging_with_args |
Use the ensembl-py logging method to process GFF3 files
By default, nextflow creates a log_file