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

Updated COSMIC to annotate protein change strings with their counts. #5181

Merged
merged 2 commits into from
Sep 13, 2018

Conversation

jonn-smith
Copy link
Collaborator

Now the COSMIC data source produces counts of each protein change found in the COSMIC database.

That is, rather than a raw count of the total number of protein changes (e.g. 2 or 7), it produces a count of each specific protein change found in the COSMIC database that overlaps a variant (e.g. p.E545K(2) or p.E545K(2)|p.E542K(2)|p.H1047R(2)|p.N345K(1)).

Fixes #4400

Copy link
Contributor

@LeeTL1220 LeeTL1220 left a comment

Choose a reason for hiding this comment

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

Back to you, @jonn-smith

final String proteinChange = getProteinChangeStringFromResults(resultSet);
if ( !proteinChange.isEmpty() ) {
if ( proteinChangeCounts.containsKey(proteinChange) ) {
proteinChangeCounts.put(proteinChange, proteinChangeCounts.get(proteinChange) + 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a better method to use to do this:

final int count = proteinChangeCounts.getOrDefault(proteinChange, 0);
proteinChangeCounts.put(proteinChange, count+1);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed!

}
catch (final SQLException ex) {
throw new GATKException("Cannot get Protein Position from column: " + GENOME_POSITION_COLUMN_NAME, ex);
throw new GATKException("Cannot get Protein Change from column: " + GENOME_POSITION_COLUMN_NAME, ex);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think protein change should be lower case

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed!

@jonn-smith jonn-smith merged commit 9146f70 into master Sep 13, 2018
@jonn-smith jonn-smith deleted the jts_COSMIC_proteins_4400 branch September 13, 2018 15:32
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