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

Fix 9461 mutations api endpoint #9586

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 1 addition & 84 deletions core/src/main/java/org/mskcc/cbio/maf/MafRecord.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,6 @@ public class MafRecord {
private String maLinkMsa;
private String maLinkPdb;

// Oncotator cols
private String oncotatorDbSnpRs;
private String oncotatorDbSnpValStatus;
private String oncotatorVariantClassification;
private String oncotatorRefseqMrnaId;
private String oncotatorUniprotName;
private String oncotatorUniprotAccession;
private String oncotatorCodonChange;
private int oncotatorProteinPosStart;
private int oncotatorProteinPosEnd;

// custom filtering of passenger and driver mutations cols
private String driverFilter;
private String driverFilterAnn;
Expand Down Expand Up @@ -520,79 +509,7 @@ public String getProteinPosition() {
public void setProteinPosition(String proteinPosition) {
this.proteinPosition = proteinPosition;
}

public String getOncotatorVariantClassification() {
return oncotatorVariantClassification;
}

public void setOncotatorVariantClassification(String oncotatorVariantClassification) {
this.oncotatorVariantClassification = oncotatorVariantClassification;
}

public String getOncotatorDbSnpRs() {
return oncotatorDbSnpRs;
}

public void setOncotatorDbSnpRs(String oncotatorDbSnpRs) {
this.oncotatorDbSnpRs = oncotatorDbSnpRs;
}

public String getOncotatorDbSnpValStatus() {
return oncotatorDbSnpValStatus;
}

public void setOncotatorDbSnpValStatus(String oncotatorDbSnpValStatus) {
this.oncotatorDbSnpValStatus = oncotatorDbSnpValStatus;
}

public String getOncotatorRefseqMrnaId() {
return oncotatorRefseqMrnaId;
}

public void setOncotatorRefseqMrnaId(String oncotatorRefseqMrnaId) {
this.oncotatorRefseqMrnaId = oncotatorRefseqMrnaId;
}

public String getOncotatorUniprotName() {
return oncotatorUniprotName;
}

public void setOncotatorUniprotName(String oncotatorUniprotName) {
this.oncotatorUniprotName = oncotatorUniprotName;
}

public String getOncotatorUniprotAccession() {
return oncotatorUniprotAccession;
}

public void setOncotatorUniprotAccession(String oncotatorUniprotAccession) {
this.oncotatorUniprotAccession = oncotatorUniprotAccession;
}

public String getOncotatorCodonChange() {
return oncotatorCodonChange;
}

public void setOncotatorCodonChange(String oncotatorCodonChange) {
this.oncotatorCodonChange = oncotatorCodonChange;
}

public int getOncotatorProteinPosStart() {
return oncotatorProteinPosStart;
}

public void setOncotatorProteinPosStart(int oncotatorProteinPosStart) {
this.oncotatorProteinPosStart = oncotatorProteinPosStart;
}

public int getOncotatorProteinPosEnd() {
return oncotatorProteinPosEnd;
}

public void setOncotatorProteinPosEnd(int oncotatorProteinPosEnd) {
this.oncotatorProteinPosEnd = oncotatorProteinPosEnd;
}


public String getMaFuncImpact() {
return maFuncImpact;
}
Expand Down
66 changes: 3 additions & 63 deletions core/src/main/java/org/mskcc/cbio/maf/MafUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,6 @@ public class MafUtil {
public static final String REFSEQ = "RefSeq";
public static final String PROTEIN_POSITION = "Protein_position";

// oncotator column names
public static final String ONCOTATOR_DBSNP_RS = "ONCOTATOR_DBSNP_RS";
public static final String ONCOTATOR_VARIANT_CLASSIFICATION = "ONCOTATOR_VARIANT_CLASSIFICATION";
public static final String ONCOTATOR_REFSEQ_MRNA_ID = "ONCOTATOR_REFSEQ_MRNA_ID";
public static final String ONCOTATOR_UNIPROT_ENTRY_NAME = "ONCOTATOR_UNIPROT_ENTRY_NAME";
public static final String ONCOTATOR_UNIPROT_ACCESSION = "ONCOTATOR_UNIPROT_ACCESSION";
public static final String ONCOTATOR_CODON_CHANGE = "ONCOTATOR_CODON_CHANGE";
public static final String ONCOTATOR_PROTEIN_POS_START = "ONCOTATOR_PROTEIN_POS_START";
public static final String ONCOTATOR_PROTEIN_POS_END = "ONCOTATOR_PROTEIN_POS_END";

Expand Down Expand Up @@ -187,13 +180,6 @@ public class MafUtil {
private int normalDepthIndex = -1;
private int normalVafIndex = -1;

// default Oncotator column indices
private int oncoDbSnpRsIndex = -1;
private int oncoVariantClassificationIndex = -1;
private int oncoRefseqMrnaIdIndex = -1;
private int oncoUniprotNameIndex = -1;
private int oncoUniprotAccessionIndex = -1;
private int oncoCodonChangeIndex = -1;
private int oncoProteinPosStartIndex = -1;
private int oncoProteinPosEndIndex = -1;

Expand Down Expand Up @@ -310,18 +296,6 @@ public MafUtil(String headerLine, Set<String> namespaces) {
scoreIndex = i;
} else if(header.equalsIgnoreCase(BAM_FILE)) {
bamFileIndex = i;
} else if(header.equalsIgnoreCase(ONCOTATOR_DBSNP_RS)) {
oncoDbSnpRsIndex = i;
} else if(header.equalsIgnoreCase(ONCOTATOR_VARIANT_CLASSIFICATION)) {
oncoVariantClassificationIndex = i;
} else if(header.equalsIgnoreCase(ONCOTATOR_REFSEQ_MRNA_ID)) {
oncoRefseqMrnaIdIndex = i;
} else if(header.equalsIgnoreCase(ONCOTATOR_UNIPROT_ENTRY_NAME)) {
oncoUniprotNameIndex = i;
} else if(header.equalsIgnoreCase(ONCOTATOR_UNIPROT_ACCESSION)) {
oncoUniprotAccessionIndex = i;
} else if(header.equalsIgnoreCase(ONCOTATOR_CODON_CHANGE)) {
oncoCodonChangeIndex = i;
} else if(header.equalsIgnoreCase(ONCOTATOR_PROTEIN_POS_START)) {
oncoProteinPosStartIndex = i;
} else if(header.equalsIgnoreCase(ONCOTATOR_PROTEIN_POS_END)) {
Expand Down Expand Up @@ -466,17 +440,7 @@ public MafRecord parseRecord(String line) {
record.setMaLinkVar(TabDelimitedFileUtil.getPartString(maLinkVarIndex, parts));
record.setMaLinkMsa(TabDelimitedFileUtil.getPartString(maLinkMsaIndex, parts));
record.setMaLinkPdb(TabDelimitedFileUtil.getPartString(maLinkPdbIndex, parts));

// Oncotator columns
record.setOncotatorDbSnpRs(TabDelimitedFileUtil.getPartString(oncoDbSnpRsIndex, parts));
record.setOncotatorVariantClassification(TabDelimitedFileUtil.getPartString(oncoVariantClassificationIndex, parts));
record.setOncotatorRefseqMrnaId(TabDelimitedFileUtil.getPartString(oncoRefseqMrnaIdIndex, parts));
record.setOncotatorUniprotName(TabDelimitedFileUtil.getPartString(oncoUniprotNameIndex, parts));
record.setOncotatorUniprotAccession(TabDelimitedFileUtil.getPartString(oncoUniprotAccessionIndex, parts));
record.setOncotatorCodonChange(TabDelimitedFileUtil.getPartString(oncoCodonChangeIndex, parts));
record.setOncotatorProteinPosStart(TabDelimitedFileUtil.getPartInt(oncoProteinPosStartIndex, parts));
record.setOncotatorProteinPosEnd(TabDelimitedFileUtil.getPartInt(oncoProteinPosEndIndex, parts));


// custom filtering of passenger and driver mutations columns
record.setDriverFilter(TabDelimitedFileUtil.getPartStringAllowEmptyAndNA(driverIndex, parts));
record.setDriverFilterAnn(TabDelimitedFileUtil.getPartStringAllowEmpty(driverAnnIndex, parts));
Expand Down Expand Up @@ -672,15 +636,7 @@ public int getTumorTotCovIndex() {
public int getTumorVarCovIndex() {
return tVarCovIndex;
}

public int getOncoVariantClassificationIndex() {
return oncoVariantClassificationIndex;
}

public int getOncoDbSnpRsIndex() {
return oncoDbSnpRsIndex;
}


public int getMaFImpactIndex() {
return maFImpactIndex;
}
Expand All @@ -700,23 +656,7 @@ public int getMaLinkMsaIndex() {
public int getMaLinkPdbIndex() {
return maLinkPdbIndex;
}

public int getOncoRefseqMrnaIdIndex() {
return oncoRefseqMrnaIdIndex;
}

public int getOncoUniprotNameIndex() {
return oncoUniprotNameIndex;
}

public int getOncoCodonChangeIndex() {
return oncoCodonChangeIndex;
}

public int getOncoUniprotAccessionIndex() {
return oncoUniprotAccessionIndex;
}


public int getOncoProteinPosStartIndex() {
return oncoProteinPosStartIndex;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private static Set<CosmicMutationFrequency> filterTruncatingCosmicByPosition(

Set<CosmicMutationFrequency> ret = new HashSet<CosmicMutationFrequency>();
Pattern p = Pattern.compile("[0-9]+");
int mutPos = mut.getOncotatorProteinPosStart();
int mutPos = 0;
for (CosmicMutationFrequency cmf : cmfs) {
String aa = cmf.getAminoAcidChange();
Matcher m = p.matcher(aa);
Expand Down
24 changes: 0 additions & 24 deletions core/src/main/java/org/mskcc/cbio/portal/dao/DaoMutation.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,23 +145,11 @@ public static int addMutationEvent(ExtendedMutation.MutationEvent event) throws
event.getTumorSeqAllele(),
event.getProteinChange(),
event.getMutationType(),
event.getFunctionalImpactScore(),
Float.toString(event.getFisValue()),
event.getLinkXVar(),
event.getLinkPdb(),
event.getLinkMsa(),
event.getNcbiBuild(),
event.getStrand(),
event.getVariantType(),
event.getDbSnpRs(),
event.getDbSnpValStatus(),
event.getOncotatorDbSnpRs(),
event.getOncotatorRefseqMrnaId(),
event.getOncotatorCodonChange(),
event.getOncotatorUniprotName(),
event.getOncotatorUniprotAccession(),
Integer.toString(event.getOncotatorProteinPosStart()),
Integer.toString(event.getOncotatorProteinPosEnd()),
boolToStr(event.isCanonicalTranscript()),
keyword==null ? "\\N":(event.getGene().getHugoGeneSymbolAllCaps()+" "+keyword));
return 1;
Expand Down Expand Up @@ -800,24 +788,12 @@ private static ExtendedMutation.MutationEvent extractMutationEvent(ResultSet rs)
event.setEndPosition(rs.getLong("END_POSITION"));
event.setProteinChange(rs.getString("PROTEIN_CHANGE"));
event.setMutationType(rs.getString("MUTATION_TYPE"));
event.setFunctionalImpactScore(rs.getString("FUNCTIONAL_IMPACT_SCORE"));
event.setFisValue(rs.getFloat("FIS_VALUE"));
event.setLinkXVar(rs.getString("LINK_XVAR"));
event.setLinkPdb(rs.getString("LINK_PDB"));
event.setLinkMsa(rs.getString("LINK_MSA"));
event.setNcbiBuild(rs.getString("NCBI_BUILD"));
event.setStrand(rs.getString("STRAND"));
event.setVariantType(rs.getString("VARIANT_TYPE"));
event.setDbSnpRs(rs.getString("DB_SNP_RS"));
event.setDbSnpValStatus(rs.getString("DB_SNP_VAL_STATUS"));
Comment on lines 794 to 795
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 can get rid of these as well

Copy link
Member

Choose a reason for hiding this comment

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

So maybe remove dbSnp* and oncotator*

Also - not sure if we are using canonical transcript still? I think we might be able to remove that one as well

Copy link
Member

Choose a reason for hiding this comment

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

Im not 100% sure about ONCOTATOR_PROTEIN_POS_START but I think it can be removed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oncotatorProteinPosStart and oncotatorProteinPosEnd are used for sorting in MutationSortBy Enum

event.setReferenceAllele(rs.getString("REFERENCE_ALLELE"));
event.setOncotatorDbSnpRs(rs.getString("ONCOTATOR_DBSNP_RS"));
event.setOncotatorRefseqMrnaId(rs.getString("ONCOTATOR_REFSEQ_MRNA_ID"));
event.setOncotatorCodonChange(rs.getString("ONCOTATOR_CODON_CHANGE"));
event.setOncotatorUniprotName(rs.getString("ONCOTATOR_UNIPROT_ENTRY_NAME"));
event.setOncotatorUniprotAccession(rs.getString("ONCOTATOR_UNIPROT_ACCESSION"));
event.setOncotatorProteinPosStart(rs.getInt("ONCOTATOR_PROTEIN_POS_START"));
event.setOncotatorProteinPosEnd(rs.getInt("ONCOTATOR_PROTEIN_POS_END"));
event.setCanonicalTranscript(rs.getBoolean("CANONICAL_TRANSCRIPT"));
event.setTumorSeqAllele(rs.getString("TUMOR_SEQ_ALLELE"));
event.setKeyword(rs.getString("KEYWORD"));
Expand Down
Loading