Skip to content

Commit

Permalink
Add toString() to cross linker classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mriffle committed Sep 5, 2018
1 parent d54775d commit 9acbbaa
Show file tree
Hide file tree
Showing 12 changed files with 145 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
*/
public class BMOE implements ILinker {

@Override
public String toString() {
return "BMOE";
}

/**
* Get all theoretically linkable positions (N-terminal residue is position 1)
* in the supplied protein sequence for this crosslinker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

public class BS2 extends AmineLinker {

@Override
public String toString() {
return "BS2";
}

@Override
public double getLinkerLength() {
return 7.7;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

public class BS3 extends AmineLinker {

@Override
public String toString() {
return "BS3";
}

@Override
public double getLinkerLength() {
return 11.4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

public class BS3_STY extends AmineLinkerSTY {

@Override
public String toString() {
return "BS3 (include STY)";
}

@Override
public double getLinkerLength() {
return 11.4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

public class DFDNB extends AmineLinker {

@Override
public String toString() {
return "DFDNB";
}

@Override
public double getLinkerLength() {
return 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

public class DSG extends AmineLinker {

@Override
public String toString() {
return "DSG";
}

@Override
public double getLinkerLength() {
return 7.7;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

public class DSS extends AmineLinker {

@Override
public String toString() {
return "DSS";
}

@Override
public double getLinkerLength() {
return 11.4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

public class DSSO extends AmineLinker {

@Override
public String toString() {
return "DSSO";
}

@Override
public double getLinkerLength() {
return 10.3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

public class DSS_STY extends AmineLinkerSTY {

@Override
public String toString() {
return "DSS (include STY)";
}

@Override
public double getLinkerLength() {
return 11.4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

public class EDC implements ILinker {

@Override
public String toString() {
return "EDC";
}

@Override
public Collection<Integer> getLinkablePositions(String proteinSequence) throws Exception {

Expand Down
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
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

public class Transglutaminase implements ILinker {

@Override
public String toString() {
return "tg (transglutaminase)";
}

@Override
public Collection<Integer> getLinkablePositions(String proteinSequence) throws Exception {

Expand Down

0 comments on commit 9acbbaa

Please sign in to comment.