-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add toString() to cross linker classes.
- Loading branch information
Showing
12 changed files
with
145 additions
and
85 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
175 changes: 90 additions & 85 deletions
175
proxl_web_app/src_shared_code/org/yeastrc/xlink/linkable_positions/linkers/SulfoSMCC.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,90 @@ | ||
package org.yeastrc.xlink.linkable_positions.linkers; | ||
|
||
import java.util.Collection; | ||
import java.util.HashSet; | ||
|
||
import org.yeastrc.xlink.utils.ProteinSequenceUtils; | ||
|
||
/* | ||
* For the Sulfo-SMCC cross-linker | ||
* From Kai Cai: Sulfo-SMCC;C12H13NO3;K{;C | ||
* Info at: https://tools.thermofisher.com/content/sfs/manuals/MAN0011295_SMCC_SulfoSMCC_UG.pdf | ||
*/ | ||
public class SulfoSMCC implements ILinker { | ||
|
||
@Override | ||
public Collection<Integer> getLinkablePositions(String proteinSequence) throws Exception { | ||
|
||
// add in lysines | ||
Collection<Integer> linkablePositions = ProteinSequenceUtils.getPositionsOfResidueForProteinSequence( proteinSequence, "K" ); | ||
|
||
// add in cysteines | ||
linkablePositions.addAll( ProteinSequenceUtils.getPositionsOfResidueForProteinSequence( proteinSequence, "C" ) ); | ||
|
||
// add in the two n-terminal residues | ||
if( !linkablePositions.contains( 1 ) ) | ||
linkablePositions.add( 1 ); | ||
|
||
if( !linkablePositions.contains( 2 ) ) | ||
linkablePositions.add( 2 ); | ||
|
||
|
||
return linkablePositions; | ||
|
||
} | ||
|
||
@Override | ||
public Collection<Integer> getLinkablePositions(String querySequence, String subjectSequence, int subjectPosition) | ||
throws Exception { | ||
|
||
String subjectResidue = subjectSequence.substring( subjectPosition - 1, subjectPosition ); | ||
Collection<Integer> linkablePositions = new HashSet<Integer>(); | ||
|
||
if( subjectResidue.equals( "K" ) ) { | ||
|
||
// lysines interact with C | ||
linkablePositions.addAll( ProteinSequenceUtils.getPositionsOfResidueForProteinSequence( querySequence, "C" ) ); | ||
|
||
} else if( subjectResidue.equals( "C" ) ) { | ||
|
||
// C interact with K and the two N-terminal residues | ||
linkablePositions.addAll( ProteinSequenceUtils.getPositionsOfResidueForProteinSequence( querySequence, "K" ) ); | ||
linkablePositions.add( 1 ); | ||
linkablePositions.add( 2 ); | ||
} | ||
|
||
// if we're at one of the two N-terminal residues, add in all links to C | ||
if( subjectPosition == 1 || subjectPosition == 2 ) { | ||
linkablePositions.addAll( ProteinSequenceUtils.getPositionsOfResidueForProteinSequence( querySequence, "C" ) ); | ||
} | ||
|
||
return linkablePositions; | ||
|
||
} | ||
|
||
@Override | ||
public double getLinkerLength() { | ||
return 8.3; | ||
} | ||
|
||
@Override | ||
public Collection<String> getCrosslinkFormulas() { | ||
|
||
Collection<String> formulas = new HashSet<>(); | ||
formulas.add( "C12H13NO3" ); | ||
|
||
return formulas; | ||
|
||
} | ||
|
||
@Override | ||
public String getCrosslinkFormula(double mass) throws Exception { | ||
return "C12H13NO3"; // from | ||
} | ||
|
||
} | ||
package org.yeastrc.xlink.linkable_positions.linkers; | ||
|
||
import java.util.Collection; | ||
import java.util.HashSet; | ||
|
||
import org.yeastrc.xlink.utils.ProteinSequenceUtils; | ||
|
||
/* | ||
* For the Sulfo-SMCC cross-linker | ||
* From Kai Cai: Sulfo-SMCC;C12H13NO3;K{;C | ||
* Info at: https://tools.thermofisher.com/content/sfs/manuals/MAN0011295_SMCC_SulfoSMCC_UG.pdf | ||
*/ | ||
public class SulfoSMCC implements ILinker { | ||
|
||
@Override | ||
public String toString() { | ||
return "Sulfo-SMCC"; | ||
} | ||
|
||
@Override | ||
public Collection<Integer> getLinkablePositions(String proteinSequence) throws Exception { | ||
|
||
// add in lysines | ||
Collection<Integer> linkablePositions = ProteinSequenceUtils.getPositionsOfResidueForProteinSequence( proteinSequence, "K" ); | ||
|
||
// add in cysteines | ||
linkablePositions.addAll( ProteinSequenceUtils.getPositionsOfResidueForProteinSequence( proteinSequence, "C" ) ); | ||
|
||
// add in the two n-terminal residues | ||
if( !linkablePositions.contains( 1 ) ) | ||
linkablePositions.add( 1 ); | ||
|
||
if( !linkablePositions.contains( 2 ) ) | ||
linkablePositions.add( 2 ); | ||
|
||
|
||
return linkablePositions; | ||
|
||
} | ||
|
||
@Override | ||
public Collection<Integer> getLinkablePositions(String querySequence, String subjectSequence, int subjectPosition) | ||
throws Exception { | ||
|
||
String subjectResidue = subjectSequence.substring( subjectPosition - 1, subjectPosition ); | ||
Collection<Integer> linkablePositions = new HashSet<Integer>(); | ||
|
||
if( subjectResidue.equals( "K" ) ) { | ||
|
||
// lysines interact with C | ||
linkablePositions.addAll( ProteinSequenceUtils.getPositionsOfResidueForProteinSequence( querySequence, "C" ) ); | ||
|
||
} else if( subjectResidue.equals( "C" ) ) { | ||
|
||
// C interact with K and the two N-terminal residues | ||
linkablePositions.addAll( ProteinSequenceUtils.getPositionsOfResidueForProteinSequence( querySequence, "K" ) ); | ||
linkablePositions.add( 1 ); | ||
linkablePositions.add( 2 ); | ||
} | ||
|
||
// if we're at one of the two N-terminal residues, add in all links to C | ||
if( subjectPosition == 1 || subjectPosition == 2 ) { | ||
linkablePositions.addAll( ProteinSequenceUtils.getPositionsOfResidueForProteinSequence( querySequence, "C" ) ); | ||
} | ||
|
||
return linkablePositions; | ||
|
||
} | ||
|
||
@Override | ||
public double getLinkerLength() { | ||
return 8.3; | ||
} | ||
|
||
@Override | ||
public Collection<String> getCrosslinkFormulas() { | ||
|
||
Collection<String> formulas = new HashSet<>(); | ||
formulas.add( "C12H13NO3" ); | ||
|
||
return formulas; | ||
|
||
} | ||
|
||
@Override | ||
public String getCrosslinkFormula(double mass) throws Exception { | ||
return "C12H13NO3"; // from | ||
} | ||
|
||
} |
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