-
Notifications
You must be signed in to change notification settings - Fork 42
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
Per position allele count reporting utility ( like bam-readcount) #297
Open
jpdna
wants to merge
4
commits into
bigdatagenomics:master
Choose a base branch
from
jpdna:posAlleleStats
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Can one of the admins verify this patch? |
+1! This looks like a great start. I'll make more of a pass over this later this week. Thanks for the first cut @jpdna! |
Jenkins, add to whitelist. |
Test FAILed. Build result: FAILUREGitHub pull request #297 of commit d6137af automatically merged.[EnvInject] - Loading node environment variables.Building remotely on amp-jenkins-staging-worker-02 (ubuntu staging-02 staging) in workspace /home/jenkins/workspace/avocado-prb > git rev-parse --is-inside-work-tree # timeout=10Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/bigdatagenomics/avocado.git # timeout=10Fetching upstream changes from https://github.com/bigdatagenomics/avocado.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/bigdatagenomics/avocado.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/297/merge^{commit} # timeout=10 > git branch -a -v --no-abbrev --contains 19dfbc2 # timeout=10Checking out Revision 19dfbc2 (origin/pr/297/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f 19dfbc267513fdb14751f43d9775194719e3c13fFirst time build. Skipping changelog.Triggering avocado-prb » 2.6.0,2.11,2.0.0,centosTriggering avocado-prb » 2.3.0,2.10,2.0.0,centosTriggering avocado-prb » 2.3.0,2.11,2.0.0,centosTriggering avocado-prb » 2.6.0,2.10,2.0.0,centosavocado-prb » 2.6.0,2.11,2.0.0,centos completed with result FAILUREavocado-prb » 2.3.0,2.10,2.0.0,centos completed with result FAILUREavocado-prb » 2.3.0,2.11,2.0.0,centos completed with result FAILUREavocado-prb » 2.6.0,2.10,2.0.0,centos completed with result FAILURETest FAILed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Looking for general comments about utility and approach - not ready for final review yet.
This PR adds functionality to produce a per-position report of counts of reads reporting an A/C/G/T/N or ins/del at each genomic position covered by at least one read in an input
alignmentRecordRDD
The functionality is intended to mirror that of the
bam-readcount
program https://github.com/genome/bam-readcount which is useful to get such per-position stats for use in downstream applications such as testing new variant calling models or evaluating background sequencing noise at a given position.The approach of this implementation is to perform a
alignmentRecordRDD.mapPartitions
, in which each partition builds in memory a hash of typemutable.Map[ReferencePosition, AlleleCounts]
which is then returned as RDD[ReferencePosition, AlleleCounts], then combined across partitions by reduceByKey adding counts at positions, to resolve partition overlapping reads. This per-partition approach seemed efficient given the size of the hash is limited to the fraction of the genome in a partition ( which can be small if genomic pos sorted), and avoids a flatmap that would produce a large RDD with every base of every read as elements.The CIGAR/MD reading algorithm was adapted from existing
DiscoverVariants
, but the context of reporting every covered position and use of the mapPartitions is sufficiently different that I think a new function/object makes sense rather than adding options toDiscoverVariants
Todo: