Skip to content
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

Generalize feature url retrieval in refactor_reportingtools_table.rb, closes #13 #166

Merged
merged 7 commits into from
Jan 31, 2022

Conversation

fischer-hub
Copy link
Collaborator

  • In the RNAseq_analysis_with_DESeq2_full_extended.html the ensembl url of current feature is now retrieved dynamically by constructing the base url first (get species name from ensemble REST API call and url prefix from mapping file) and adding the according feature suffix containing the ensemble stable ID
  • added mapping file containing the listed species from ensemble.org and all the sister sites mapped to their sister site url prefix

@fischer-hub fischer-hub added the enhancement New feature or request label Jan 19, 2022
@fischer-hub fischer-hub linked an issue Jan 19, 2022 that may be closed by this pull request
@hoelzer
Copy link
Contributor

hoelzer commented Jan 29, 2022

really great @fischer-hub . So basically, this will now check for the base URL and three letter species code automatically and simply based on the input GTF annotation file, right?

What happens if the user provides a non-Ensembl annotation? Or let's say analyses some data of a non-model species with no available Ensembl annotation? Can the pipeline still deal w/ that and just does not provide any links to Ensemlb in the final output?

@fischer-hub
Copy link
Collaborator Author

Yep the species is identified through the ENS ID in the annotation file.
Right, in case the gene ID is not a valid ENS ID (not ensebml or not in DB) the rest api call will return a bad request and the ens_url variable will just be set to false, so the output will not have links to ensembl.

@hoelzer
Copy link
Contributor

hoelzer commented Jan 29, 2022

Yep the species is identified through the ENS ID in the annotation file. Right, in case the gene ID is not a valid ENS ID (not ensebml or not in DB) the rest api call will return a bad request and the ens_url variable will just be set to false, so the output will not have links to ensembl.

great! last question to this PR I think: what happens when no internet connection is available OR the API call is e.g. blocked for whatever reason (e.g. thinking about restricted government servers... ;) ).

@fischer-hub
Copy link
Collaborator Author

Good question, I think it should work because we check for a valid response e.g. response code 200 or smth like that and in all other cases the url var will just be false, but I'd have to check again that the ruby script doesn't just crash without connection..

@hoelzer
Copy link
Contributor

hoelzer commented Jan 29, 2022

Good question, I think it should work because we check for a valid response e.g. response code 200 or smth like that and in all other cases the url var will just be false, but I'd have to check again that the ruby script doesn't just crash without connection..

I mean should be rare: its 2022 and almost all the time users should have a solid internet connection ;) If you can try this out, nice, if not also fine. Please feel free to merge this PR then! thx!

@fischer-hub
Copy link
Collaborator Author

Good question, I think it should work because we check for a valid response e.g. response code 200 or smth like that and in all other cases the url var will just be false, but I'd have to check again that the ruby script doesn't just crash without connection..

I mean should be rare: its 2022 and almost all the time users should have a solid internet connection ;) If you can try this out, nice, if not also fine. Please feel free to merge this PR then! thx!

without connection the ruby module actually crashed! this is now catched and will just behave as if no url was found -> report will just not contain links!

@hoelzer
Copy link
Contributor

hoelzer commented Jan 31, 2022

Great, ok good you tested this! Please feel free to merge this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

generalize refactor_reportingtools_table.rb
2 participants