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

Add resistance gene depth qc #14

Merged
merged 8 commits into from
Sep 27, 2023
Merged

Add resistance gene depth qc #14

merged 8 commits into from
Sep 27, 2023

Conversation

taranewman
Copy link
Member

@taranewman taranewman commented Sep 23, 2023

solution for calculating gene coverage from #12

Note: double check calculate_res_gene_depth.py is indexing the genome position correctly and confirm calculation is correct for one sample/gene before merging.

@dfornika dfornika self-requested a review September 27, 2023 19:58
Copy link
Member

@dfornika dfornika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great. Just a few small changes.

for line in bed_file:
fields = line.strip().split()
gene_name = fields[3]
start_position = int(fields[1])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we may need to add 1 to the start position in the bed file to make it consistent with the start position in the depths file.

https://www.htslib.org/doc/samtools-mpileup.html#Pileup_Format
https://en.wikipedia.org/wiki/BED_(file_format)
https://en.wikipedia.org/wiki/General_feature_format

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, fixed here

@dfornika dfornika changed the title Add depth qc Add resistance gene depth qc Sep 27, 2023
Copy link
Member

@dfornika dfornika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, one more change. Can you add a 'shebang' line to the top of the script?

#!/usr/bin/env python3

@taranewman taranewman requested a review from dfornika September 27, 2023 21:46
@dfornika dfornika merged commit 1056065 into main Sep 27, 2023
@dfornika dfornika mentioned this pull request Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants