id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
31,900
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/domain/PDBDomainProvider.java
PDBDomainProvider.getDomainNames
@Override public SortedSet<String> getDomainNames(String name) { if ( name.length() < 4) throw new IllegalArgumentException("Can't interpret IDs that are shorter than 4 residues!"); String url = String.format("%srepresentativeDomains?cluster=%s&structureId=%s", base, cutoff, name); return requestRepresen...
java
@Override public SortedSet<String> getDomainNames(String name) { if ( name.length() < 4) throw new IllegalArgumentException("Can't interpret IDs that are shorter than 4 residues!"); String url = String.format("%srepresentativeDomains?cluster=%s&structureId=%s", base, cutoff, name); return requestRepresen...
[ "@", "Override", "public", "SortedSet", "<", "String", ">", "getDomainNames", "(", "String", "name", ")", "{", "if", "(", "name", ".", "length", "(", ")", "<", "4", ")", "throw", "new", "IllegalArgumentException", "(", "\"Can't interpret IDs that are shorter tha...
Gets a list of domain representatives for a given PDB ID.
[ "Gets", "a", "list", "of", "domain", "representatives", "for", "a", "given", "PDB", "ID", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/domain/PDBDomainProvider.java#L70-L78
31,901
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/domain/PDBDomainProvider.java
PDBDomainProvider.getRepresentativeDomains
@Override public SortedSet<String> getRepresentativeDomains() { String url = base + "representativeDomains?cluster="+ cutoff; return requestRepresentativeDomains(url); }
java
@Override public SortedSet<String> getRepresentativeDomains() { String url = base + "representativeDomains?cluster="+ cutoff; return requestRepresentativeDomains(url); }
[ "@", "Override", "public", "SortedSet", "<", "String", ">", "getRepresentativeDomains", "(", ")", "{", "String", "url", "=", "base", "+", "\"representativeDomains?cluster=\"", "+", "cutoff", ";", "return", "requestRepresentativeDomains", "(", "url", ")", ";", "}" ...
Gets a list of all domain representatives
[ "Gets", "a", "list", "of", "all", "domain", "representatives" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/domain/PDBDomainProvider.java#L82-L86
31,902
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/domain/PDBDomainProvider.java
PDBDomainProvider.requestRepresentativeDomains
private SortedSet<String> requestRepresentativeDomains(String url) { try { //System.out.println(url); final SortedSet<String> results = new TreeSet<String>(); DefaultHandler handler = new DefaultHandler() { @Override public void startElement(String uri, String localName,String qName, Attribut...
java
private SortedSet<String> requestRepresentativeDomains(String url) { try { //System.out.println(url); final SortedSet<String> results = new TreeSet<String>(); DefaultHandler handler = new DefaultHandler() { @Override public void startElement(String uri, String localName,String qName, Attribut...
[ "private", "SortedSet", "<", "String", ">", "requestRepresentativeDomains", "(", "String", "url", ")", "{", "try", "{", "//System.out.println(url);", "final", "SortedSet", "<", "String", ">", "results", "=", "new", "TreeSet", "<", "String", ">", "(", ")", ";",...
Handles fetching and parsing XML from representativeDomains requests @param url Eg "http://www.rcsb.org/pdb/rest/representativeDomains" @return The names of all domain representatives
[ "Handles", "fetching", "and", "parsing", "XML", "from", "representativeDomains", "requests" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/domain/PDBDomainProvider.java#L93-L124
31,903
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/domain/PDBDomainProvider.java
PDBDomainProvider.handleRestRequest
private static void handleRestRequest(String url, DefaultHandler handler) throws SAXException, IOException, ParserConfigurationException { // Fetch XML stream URL u = new URL(url); InputStream response = URLConnectionTools.getInputStream(u); InputSource xml = new InputSource(response); // Parse XML SAXPars...
java
private static void handleRestRequest(String url, DefaultHandler handler) throws SAXException, IOException, ParserConfigurationException { // Fetch XML stream URL u = new URL(url); InputStream response = URLConnectionTools.getInputStream(u); InputSource xml = new InputSource(response); // Parse XML SAXPars...
[ "private", "static", "void", "handleRestRequest", "(", "String", "url", ",", "DefaultHandler", "handler", ")", "throws", "SAXException", ",", "IOException", ",", "ParserConfigurationException", "{", "// Fetch XML stream", "URL", "u", "=", "new", "URL", "(", "url", ...
Handles fetching and processing REST requests. The actual XML parsing is handled by the handler, which is also in charge of storing interesting data. @param url REST request @param handler SAX XML parser @throws SAXException @throws IOException @throws ParserConfigurationException
[ "Handles", "fetching", "and", "processing", "REST", "requests", ".", "The", "actual", "XML", "parsing", "is", "handled", "by", "the", "handler", "which", "is", "also", "in", "charge", "of", "storing", "interesting", "data", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/domain/PDBDomainProvider.java#L134-L145
31,904
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/pairwise/FragmentJoiner.java
FragmentJoiner.getDensity
private double getDensity(Atom[] ca1subset, Atom[] ca2subset ) throws StructureException{ Atom centroid1 = Calc.getCentroid(ca1subset); Atom centroid2 = Calc.getCentroid(ca2subset); // get Average distance to centroid ... double d1 = 0; double d2 = 0; for ( int i = 0 ; i < ca1subset.length;i++){ dou...
java
private double getDensity(Atom[] ca1subset, Atom[] ca2subset ) throws StructureException{ Atom centroid1 = Calc.getCentroid(ca1subset); Atom centroid2 = Calc.getCentroid(ca2subset); // get Average distance to centroid ... double d1 = 0; double d2 = 0; for ( int i = 0 ; i < ca1subset.length;i++){ dou...
[ "private", "double", "getDensity", "(", "Atom", "[", "]", "ca1subset", ",", "Atom", "[", "]", "ca2subset", ")", "throws", "StructureException", "{", "Atom", "centroid1", "=", "Calc", ".", "getCentroid", "(", "ca1subset", ")", ";", "Atom", "centroid2", "=", ...
this is probably useless @param ca1subset @param ca2subset @return a double @throws StructureException
[ "this", "is", "probably", "useless" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/pairwise/FragmentJoiner.java#L249-L272
31,905
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/pairwise/FragmentJoiner.java
FragmentJoiner.getRMS
public static double getRMS(Atom[] ca1, Atom[]ca2,JointFragments frag) throws StructureException { // now svd ftmp and check if the rms is < X ... AlternativeAlignment ali = new AlternativeAlignment(); ali.apairs_from_idxlst(frag); double rms = 999; int[] idx1 = ali.getIdx1(); int[] idx2 = ali.getIdx2...
java
public static double getRMS(Atom[] ca1, Atom[]ca2,JointFragments frag) throws StructureException { // now svd ftmp and check if the rms is < X ... AlternativeAlignment ali = new AlternativeAlignment(); ali.apairs_from_idxlst(frag); double rms = 999; int[] idx1 = ali.getIdx1(); int[] idx2 = ali.getIdx2...
[ "public", "static", "double", "getRMS", "(", "Atom", "[", "]", "ca1", ",", "Atom", "[", "]", "ca2", ",", "JointFragments", "frag", ")", "throws", "StructureException", "{", "// now svd ftmp and check if the rms is < X ...", "AlternativeAlignment", "ali", "=", "...
Get the RMS of the JointFragments pair frag @param ca1 the array of all atoms of structure1 @param ca2 the array of all atoms of structure1 @param frag the JointFragments object that contains the list of identical positions @return the rms
[ "Get", "the", "RMS", "of", "the", "JointFragments", "pair", "frag" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/pairwise/FragmentJoiner.java#L296-L322
31,906
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/Stoichiometry.java
Stoichiometry.getComponent
public Stoichiometry getComponent(int i) { return new Stoichiometry(Collections.singletonList(orderedClusters.get(i)),this.strategy,false); }
java
public Stoichiometry getComponent(int i) { return new Stoichiometry(Collections.singletonList(orderedClusters.get(i)),this.strategy,false); }
[ "public", "Stoichiometry", "getComponent", "(", "int", "i", ")", "{", "return", "new", "Stoichiometry", "(", "Collections", ".", "singletonList", "(", "orderedClusters", ".", "get", "(", "i", ")", ")", ",", "this", ".", "strategy", ",", "false", ")", ";", ...
Make a Stoichiometry object that corresponds to a single component. @param i component index @return new {@link Stoichiometry} object.
[ "Make", "a", "Stoichiometry", "object", "that", "corresponds", "to", "a", "single", "component", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/Stoichiometry.java#L264-L266
31,907
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/Stoichiometry.java
Stoichiometry.setStrategy
public void setStrategy(StringOverflowStrategy strategy) { if(strategy==StringOverflowStrategy.CUSTOM) { throw new IllegalArgumentException("Set this strategy by providing a function of the type Function<List<SubunitCluster>,String>."); } if(this.strategy != strategy) { this.strategy = strategy; if(orde...
java
public void setStrategy(StringOverflowStrategy strategy) { if(strategy==StringOverflowStrategy.CUSTOM) { throw new IllegalArgumentException("Set this strategy by providing a function of the type Function<List<SubunitCluster>,String>."); } if(this.strategy != strategy) { this.strategy = strategy; if(orde...
[ "public", "void", "setStrategy", "(", "StringOverflowStrategy", "strategy", ")", "{", "if", "(", "strategy", "==", "StringOverflowStrategy", ".", "CUSTOM", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Set this strategy by providing a function of the type Fu...
Change string representation of a stoichiometry in case number of clusters exceeds number of letters in the alphabet. This action may invalidate alphas already assigned to the clusters. @param strategy {@link StringOverflowStrategy} used in this stoichiometry to construct human-readable representation in case number of...
[ "Change", "string", "representation", "of", "a", "stoichiometry", "in", "case", "number", "of", "clusters", "exceeds", "number", "of", "letters", "in", "the", "alphabet", ".", "This", "action", "may", "invalidate", "alphas", "already", "assigned", "to", "the", ...
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/Stoichiometry.java#L285-L295
31,908
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/Stoichiometry.java
Stoichiometry.setCustomStringGenerator
public void setCustomStringGenerator(Function<List<SubunitCluster>,String> customStringGenerator) { this.strategy = StringOverflowStrategy.CUSTOM; this.customStringGenerator = customStringGenerator; }
java
public void setCustomStringGenerator(Function<List<SubunitCluster>,String> customStringGenerator) { this.strategy = StringOverflowStrategy.CUSTOM; this.customStringGenerator = customStringGenerator; }
[ "public", "void", "setCustomStringGenerator", "(", "Function", "<", "List", "<", "SubunitCluster", ">", ",", "String", ">", "customStringGenerator", ")", "{", "this", ".", "strategy", "=", "StringOverflowStrategy", ".", "CUSTOM", ";", "this", ".", "customStringGen...
Let a user-defined function handle the entire string representation of a stoichiometry. @param customStringGenerator A function which accepts a list of subunit clusters and returns a string.
[ "Let", "a", "user", "-", "defined", "function", "handle", "the", "entire", "string", "representation", "of", "a", "stoichiometry", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/Stoichiometry.java#L303-L306
31,909
biojava/biojava
biojava-structure-gui/src/main/java/demo/DemoStructureFromFasta.java
DemoStructureFromFasta.displayStructure
private static void displayStructure(Structure structure, ResidueNumber[] residues) { //Display each structure BiojavaJmol jmol = new BiojavaJmol(); jmol.setStructure(structure); //Highlight non-null atoms jmol.evalString("select *; spacefill off; wireframe off; color chain; backbone 0.4; "); String se...
java
private static void displayStructure(Structure structure, ResidueNumber[] residues) { //Display each structure BiojavaJmol jmol = new BiojavaJmol(); jmol.setStructure(structure); //Highlight non-null atoms jmol.evalString("select *; spacefill off; wireframe off; color chain; backbone 0.4; "); String se...
[ "private", "static", "void", "displayStructure", "(", "Structure", "structure", ",", "ResidueNumber", "[", "]", "residues", ")", "{", "//Display each structure", "BiojavaJmol", "jmol", "=", "new", "BiojavaJmol", "(", ")", ";", "jmol", ".", "setStructure", "(", "...
Displays the given structure and highlights the given residues. @param structure The structure to display @param residues A list of residues to highlight
[ "Displays", "the", "given", "structure", "and", "highlights", "the", "given", "residues", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure-gui/src/main/java/demo/DemoStructureFromFasta.java#L117-L128
31,910
biojava/biojava
biojava-structure-gui/src/main/java/demo/DemoStructureFromFasta.java
DemoStructureFromFasta.buildJmolSelection
private static String buildJmolSelection(ResidueNumber[] residues) { StringBuilder cmd = new StringBuilder("select "); for(ResidueNumber res : residues) { if(res != null) { cmd.append(String.format("%d^%s:%s.CA or ", res.getSeqNum(), res.getInsCode()==null?" ":res.getInsCode(), res.getChainName...
java
private static String buildJmolSelection(ResidueNumber[] residues) { StringBuilder cmd = new StringBuilder("select "); for(ResidueNumber res : residues) { if(res != null) { cmd.append(String.format("%d^%s:%s.CA or ", res.getSeqNum(), res.getInsCode()==null?" ":res.getInsCode(), res.getChainName...
[ "private", "static", "String", "buildJmolSelection", "(", "ResidueNumber", "[", "]", "residues", ")", "{", "StringBuilder", "cmd", "=", "new", "StringBuilder", "(", "\"select \"", ")", ";", "for", "(", "ResidueNumber", "res", ":", "residues", ")", "{", "if", ...
Converts an array of ResidueNumbers into a jMol selection. <p>For example, "select 11^ :A.CA or 12^ :A.CA;" would select the CA atoms of residues 11-12 on chain A. @param residues Residues to include in the selection. Nulls are ignored. @return
[ "Converts", "an", "array", "of", "ResidueNumbers", "into", "a", "jMol", "selection", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure-gui/src/main/java/demo/DemoStructureFromFasta.java#L140-L151
31,911
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/xml/AFPChainXMLConverter.java
AFPChainXMLConverter.toXML
public synchronized static String toXML(AFPChain afpChain, Atom[] ca1, Atom[]ca2) throws IOException{ StringWriter result = new StringWriter(); toXML(afpChain,result,ca1,ca2); return result.toString(); }
java
public synchronized static String toXML(AFPChain afpChain, Atom[] ca1, Atom[]ca2) throws IOException{ StringWriter result = new StringWriter(); toXML(afpChain,result,ca1,ca2); return result.toString(); }
[ "public", "synchronized", "static", "String", "toXML", "(", "AFPChain", "afpChain", ",", "Atom", "[", "]", "ca1", ",", "Atom", "[", "]", "ca2", ")", "throws", "IOException", "{", "StringWriter", "result", "=", "new", "StringWriter", "(", ")", ";", "toXML",...
Convert an afpChain to a simple XML representation @param afpChain @return XML representation of the AFPCHain
[ "Convert", "an", "afpChain", "to", "a", "simple", "XML", "representation" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/xml/AFPChainXMLConverter.java#L44-L48
31,912
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/xml/AFPChainXMLConverter.java
AFPChainXMLConverter.toXML
public synchronized static void toXML(AFPChain afpChain, StringWriter swriter,Atom[] ca1, Atom[]ca2) throws IOException{ PrintWriter writer = new PrintWriter(swriter); PrettyXMLWriter xml = new PrettyXMLWriter(writer); xml.openTag("AFPChain"); printXMLHeader(xml,afpChain); // that is the initial alignmen...
java
public synchronized static void toXML(AFPChain afpChain, StringWriter swriter,Atom[] ca1, Atom[]ca2) throws IOException{ PrintWriter writer = new PrintWriter(swriter); PrettyXMLWriter xml = new PrettyXMLWriter(writer); xml.openTag("AFPChain"); printXMLHeader(xml,afpChain); // that is the initial alignmen...
[ "public", "synchronized", "static", "void", "toXML", "(", "AFPChain", "afpChain", ",", "StringWriter", "swriter", ",", "Atom", "[", "]", "ca1", ",", "Atom", "[", "]", "ca2", ")", "throws", "IOException", "{", "PrintWriter", "writer", "=", "new", "PrintWriter...
Write the XML representation to a StringWriter @param afpChain @param swriter @throws IOException
[ "Write", "the", "XML", "representation", "to", "a", "StringWriter" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/xml/AFPChainXMLConverter.java#L56-L102
31,913
biojava/biojava
biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastAlignmentProperties.java
NCBIQBlastAlignmentProperties.getAlignmentOptions
@Override public Set<String> getAlignmentOptions() { Set<String> result = new HashSet<String>(); for (BlastAlignmentParameterEnum parameter : param.keySet()) { result.add(parameter.name()); } return result; }
java
@Override public Set<String> getAlignmentOptions() { Set<String> result = new HashSet<String>(); for (BlastAlignmentParameterEnum parameter : param.keySet()) { result.add(parameter.name()); } return result; }
[ "@", "Override", "public", "Set", "<", "String", ">", "getAlignmentOptions", "(", ")", "{", "Set", "<", "String", ">", "result", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "for", "(", "BlastAlignmentParameterEnum", "parameter", ":", "param",...
Gets parameters, which are currently set
[ "Gets", "parameters", "which", "are", "currently", "set" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastAlignmentProperties.java#L70-L77
31,914
biojava/biojava
biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastAlignmentProperties.java
NCBIQBlastAlignmentProperties.setBlastProgram
public void setBlastProgram(BlastProgramEnum program) { if (BlastProgramEnum.megablast != program) { setAlignmentOption(PROGRAM, program.name()); removeAlignmentOption(MEGABLAST); } else { setAlignmentOption(PROGRAM, BlastProgramEnum.blastn.name()); setAlignmentOption(MEGABLAST, "on"); } }
java
public void setBlastProgram(BlastProgramEnum program) { if (BlastProgramEnum.megablast != program) { setAlignmentOption(PROGRAM, program.name()); removeAlignmentOption(MEGABLAST); } else { setAlignmentOption(PROGRAM, BlastProgramEnum.blastn.name()); setAlignmentOption(MEGABLAST, "on"); } }
[ "public", "void", "setBlastProgram", "(", "BlastProgramEnum", "program", ")", "{", "if", "(", "BlastProgramEnum", ".", "megablast", "!=", "program", ")", "{", "setAlignmentOption", "(", "PROGRAM", ",", "program", ".", "name", "(", ")", ")", ";", "removeAlignme...
Sets the program to be used with blastall @param program : one of blastall programs
[ "Sets", "the", "program", "to", "be", "used", "with", "blastall" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastAlignmentProperties.java#L114-L122
31,915
biojava/biojava
biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastAlignmentProperties.java
NCBIQBlastAlignmentProperties.getBlastWordSize
public int getBlastWordSize() { if (param.containsKey(WORD_SIZE)) { return Integer.parseInt(getAlignmentOption(WORD_SIZE)); } // return default word size value try { BlastProgramEnum programType = getBlastProgram(); switch (programType) { case blastn: return 11; case megablast: return 28...
java
public int getBlastWordSize() { if (param.containsKey(WORD_SIZE)) { return Integer.parseInt(getAlignmentOption(WORD_SIZE)); } // return default word size value try { BlastProgramEnum programType = getBlastProgram(); switch (programType) { case blastn: return 11; case megablast: return 28...
[ "public", "int", "getBlastWordSize", "(", ")", "{", "if", "(", "param", ".", "containsKey", "(", "WORD_SIZE", ")", ")", "{", "return", "Integer", ".", "parseInt", "(", "getAlignmentOption", "(", "WORD_SIZE", ")", ")", ";", "}", "// return default word size val...
Returns the value of the WORD_SIZE parameter used for this blast run @return int value of WORD_SIZE used by this search @throws IllegalArgumentException when program type is not set and program type is not supported
[ "Returns", "the", "value", "of", "the", "WORD_SIZE", "parameter", "used", "for", "this", "blast", "run" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastAlignmentProperties.java#L179-L203
31,916
biojava/biojava
biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastAlignmentProperties.java
NCBIQBlastAlignmentProperties.setBlastGapCosts
public void setBlastGapCosts(int gapCreation, int gapExtension) { String gc = Integer.toString(gapCreation); String ge = Integer.toString(gapExtension); setAlignmentOption(GAPCOSTS, gc + "+" + ge); }
java
public void setBlastGapCosts(int gapCreation, int gapExtension) { String gc = Integer.toString(gapCreation); String ge = Integer.toString(gapExtension); setAlignmentOption(GAPCOSTS, gc + "+" + ge); }
[ "public", "void", "setBlastGapCosts", "(", "int", "gapCreation", ",", "int", "gapExtension", ")", "{", "String", "gc", "=", "Integer", ".", "toString", "(", "gapCreation", ")", ";", "String", "ge", "=", "Integer", ".", "toString", "(", "gapExtension", ")", ...
Sets the GAPCOSTS parameter @param gapCreation integer to use as gap creation value @param gapExtension integer to use as gap extension value
[ "Sets", "the", "GAPCOSTS", "parameter" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastAlignmentProperties.java#L266-L270
31,917
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/cox/CoxInfo.java
CoxInfo.fmtpl
public String fmtpl(String d, int pad) { int length = d.length(); int extra = pad - length; if (extra < 0) { extra = 0; } String v = d; for (int i = 0; i < extra; i++) { v = " " + v; } return v; }
java
public String fmtpl(String d, int pad) { int length = d.length(); int extra = pad - length; if (extra < 0) { extra = 0; } String v = d; for (int i = 0; i < extra; i++) { v = " " + v; } return v; }
[ "public", "String", "fmtpl", "(", "String", "d", ",", "int", "pad", ")", "{", "int", "length", "=", "d", ".", "length", "(", ")", ";", "int", "extra", "=", "pad", "-", "length", ";", "if", "(", "extra", "<", "0", ")", "{", "extra", "=", "0", ...
Pad left a string with spaces @param d @param pad @return
[ "Pad", "left", "a", "string", "with", "spaces" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/cox/CoxInfo.java#L464-L475
31,918
biojava/biojava
biojava-structure-gui/src/main/java/org/biojava/nbio/structure/gui/util/SequenceMouseListener.java
SequenceMouseListener.getSeqPos
private int getSeqPos(MouseEvent e) { int x = e.getX(); //int y = e.getY(); //float scale = seqScale.getScale(); //int DEFAULT_X_START = SequenceScalePanel.DEFAULT_X_START; float scale = parent.getScale(); coordManager.setScale(scale); int seqpos = coordManager.getSeqPos(x-2); return seqpos ; }
java
private int getSeqPos(MouseEvent e) { int x = e.getX(); //int y = e.getY(); //float scale = seqScale.getScale(); //int DEFAULT_X_START = SequenceScalePanel.DEFAULT_X_START; float scale = parent.getScale(); coordManager.setScale(scale); int seqpos = coordManager.getSeqPos(x-2); return seqpos ; }
[ "private", "int", "getSeqPos", "(", "MouseEvent", "e", ")", "{", "int", "x", "=", "e", ".", "getX", "(", ")", ";", "//int y = e.getY();", "//float scale = seqScale.getScale();", "//int DEFAULT_X_START = SequenceScalePanel.DEFAULT_X_START;", "float", "scale", "=", "paren...
get the sequence position of the current mouse event
[ "get", "the", "sequence", "position", "of", "the", "current", "mouse", "event" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure-gui/src/main/java/org/biojava/nbio/structure/gui/util/SequenceMouseListener.java#L124-L138
31,919
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.clear
public void clear() { columnLookup.clear(); rowLookup.clear(); data = null; dataGrid.clear(); doubleValues.clear(); System.gc(); }
java
public void clear() { columnLookup.clear(); rowLookup.clear(); data = null; dataGrid.clear(); doubleValues.clear(); System.gc(); }
[ "public", "void", "clear", "(", ")", "{", "columnLookup", ".", "clear", "(", ")", ";", "rowLookup", ".", "clear", "(", ")", ";", "data", "=", "null", ";", "dataGrid", ".", "clear", "(", ")", ";", "doubleValues", ".", "clear", "(", ")", ";", "System...
See if we can free up memory
[ "See", "if", "we", "can", "free", "up", "memory" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L117-L124
31,920
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.getCopyWorkSheetSelectedRows
static public WorkSheet getCopyWorkSheetSelectedRows(WorkSheet copyWorkSheet, ArrayList<String> rows) throws Exception { ArrayList<String> columns = copyWorkSheet.getColumns(); WorkSheet workSheet = new WorkSheet(rows, columns); for (String row : rows) { for (String col : columns) { workSheet.addCell(ro...
java
static public WorkSheet getCopyWorkSheetSelectedRows(WorkSheet copyWorkSheet, ArrayList<String> rows) throws Exception { ArrayList<String> columns = copyWorkSheet.getColumns(); WorkSheet workSheet = new WorkSheet(rows, columns); for (String row : rows) { for (String col : columns) { workSheet.addCell(ro...
[ "static", "public", "WorkSheet", "getCopyWorkSheetSelectedRows", "(", "WorkSheet", "copyWorkSheet", ",", "ArrayList", "<", "String", ">", "rows", ")", "throws", "Exception", "{", "ArrayList", "<", "String", ">", "columns", "=", "copyWorkSheet", ".", "getColumns", ...
Create a copy of a worksheet. If shuffling of columns or row for testing a way to duplicate original worksheet @param copyWorkSheet @param rows @return @throws Exception
[ "Create", "a", "copy", "of", "a", "worksheet", ".", "If", "shuffling", "of", "columns", "or", "row", "for", "testing", "a", "way", "to", "duplicate", "original", "worksheet" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L171-L186
31,921
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.shuffleColumnsAndThenRows
public void shuffleColumnsAndThenRows(ArrayList<String> columns, ArrayList<String> rows) throws Exception { doubleValues.clear(); for (String column : columns) { //shuffle all values in the column ArrayList<Integer> rowIndex = new ArrayList<Integer>(); for (int i = 0; i < rows.size(); i++) { rowIndex.add...
java
public void shuffleColumnsAndThenRows(ArrayList<String> columns, ArrayList<String> rows) throws Exception { doubleValues.clear(); for (String column : columns) { //shuffle all values in the column ArrayList<Integer> rowIndex = new ArrayList<Integer>(); for (int i = 0; i < rows.size(); i++) { rowIndex.add...
[ "public", "void", "shuffleColumnsAndThenRows", "(", "ArrayList", "<", "String", ">", "columns", ",", "ArrayList", "<", "String", ">", "rows", ")", "throws", "Exception", "{", "doubleValues", ".", "clear", "(", ")", ";", "for", "(", "String", "column", ":", ...
Randomly shuffle the columns and rows. Should be constrained to the same data type if not probably doesn't make any sense. @param columns @param rows @throws Exception
[ "Randomly", "shuffle", "the", "columns", "and", "rows", ".", "Should", "be", "constrained", "to", "the", "same", "data", "type", "if", "not", "probably", "doesn", "t", "make", "any", "sense", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L291-L334
31,922
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.shuffleColumnValues
public void shuffleColumnValues(ArrayList<String> columns) throws Exception { doubleValues.clear(); ArrayList<String> rows = this.getDataRows(); for (String column : columns) { //shuffle all values in the column ArrayList<Integer> rowIndex = new ArrayList<Integer>(); for (int i = 0; i < rows.size(); i++) { ...
java
public void shuffleColumnValues(ArrayList<String> columns) throws Exception { doubleValues.clear(); ArrayList<String> rows = this.getDataRows(); for (String column : columns) { //shuffle all values in the column ArrayList<Integer> rowIndex = new ArrayList<Integer>(); for (int i = 0; i < rows.size(); i++) { ...
[ "public", "void", "shuffleColumnValues", "(", "ArrayList", "<", "String", ">", "columns", ")", "throws", "Exception", "{", "doubleValues", ".", "clear", "(", ")", ";", "ArrayList", "<", "String", ">", "rows", "=", "this", ".", "getDataRows", "(", ")", ";",...
Need to shuffle column values to allow for randomized testing. The columns in the list will be shuffled together @param columns @throws Exception
[ "Need", "to", "shuffle", "column", "values", "to", "allow", "for", "randomized", "testing", ".", "The", "columns", "in", "the", "list", "will", "be", "shuffled", "together" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L343-L365
31,923
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.shuffleRowValues
public void shuffleRowValues(ArrayList<String> rows) throws Exception { doubleValues.clear(); ArrayList<String> columns = this.getColumns(); for (String row : rows) { ArrayList<Integer> columnIndex = new ArrayList<Integer>(); for (int i = 0; i < columns.size(); i++) { columnIndex.add(i); } Collect...
java
public void shuffleRowValues(ArrayList<String> rows) throws Exception { doubleValues.clear(); ArrayList<String> columns = this.getColumns(); for (String row : rows) { ArrayList<Integer> columnIndex = new ArrayList<Integer>(); for (int i = 0; i < columns.size(); i++) { columnIndex.add(i); } Collect...
[ "public", "void", "shuffleRowValues", "(", "ArrayList", "<", "String", ">", "rows", ")", "throws", "Exception", "{", "doubleValues", ".", "clear", "(", ")", ";", "ArrayList", "<", "String", ">", "columns", "=", "this", ".", "getColumns", "(", ")", ";", "...
Need to shuffle rows values to allow for randomized testing. The rows in the list will be shuffled together @param rows @throws Exception
[ "Need", "to", "shuffle", "rows", "values", "to", "allow", "for", "randomized", "testing", ".", "The", "rows", "in", "the", "list", "will", "be", "shuffled", "together" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L374-L396
31,924
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.markMetaDataColumns
public void markMetaDataColumns(ArrayList<String> metaDataColumns) { for (String column : metaDataColumns) { metaDataColumnsHashMap.put(column, column); } }
java
public void markMetaDataColumns(ArrayList<String> metaDataColumns) { for (String column : metaDataColumns) { metaDataColumnsHashMap.put(column, column); } }
[ "public", "void", "markMetaDataColumns", "(", "ArrayList", "<", "String", ">", "metaDataColumns", ")", "{", "for", "(", "String", "column", ":", "metaDataColumns", ")", "{", "metaDataColumnsHashMap", ".", "put", "(", "column", ",", "column", ")", ";", "}", "...
marks columns as containing meta data @param metaDataColumns
[ "marks", "columns", "as", "containing", "meta", "data" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L485-L489
31,925
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.replaceColumnValues
public void replaceColumnValues(String column, HashMap<String, String> values) throws Exception { for (String row : rowLookup.keySet()) { String oldValue = this.getCell(row, column); String newValue = values.get(oldValue); this.addCell(row, column, newValue); } }
java
public void replaceColumnValues(String column, HashMap<String, String> values) throws Exception { for (String row : rowLookup.keySet()) { String oldValue = this.getCell(row, column); String newValue = values.get(oldValue); this.addCell(row, column, newValue); } }
[ "public", "void", "replaceColumnValues", "(", "String", "column", ",", "HashMap", "<", "String", ",", "String", ">", "values", ")", "throws", "Exception", "{", "for", "(", "String", "row", ":", "rowLookup", ".", "keySet", "(", ")", ")", "{", "String", "o...
Change values in a column where 0 = something and 1 = something different @param column @param values @throws Exception
[ "Change", "values", "in", "a", "column", "where", "0", "=", "something", "and", "1", "=", "something", "different" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L618-L625
31,926
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.applyColumnFilter
public void applyColumnFilter(String column, ChangeValue changeValue) throws Exception { for (String row : rowLookup.keySet()) { String oldValue = this.getCell(row, column); String newValue = changeValue.change(oldValue); this.addCell(row, column, newValue); } }
java
public void applyColumnFilter(String column, ChangeValue changeValue) throws Exception { for (String row : rowLookup.keySet()) { String oldValue = this.getCell(row, column); String newValue = changeValue.change(oldValue); this.addCell(row, column, newValue); } }
[ "public", "void", "applyColumnFilter", "(", "String", "column", ",", "ChangeValue", "changeValue", ")", "throws", "Exception", "{", "for", "(", "String", "row", ":", "rowLookup", ".", "keySet", "(", ")", ")", "{", "String", "oldValue", "=", "this", ".", "g...
Apply filter to a column to change values from say numberic to nominal based on some range @param column @param changeValue @throws Exception
[ "Apply", "filter", "to", "a", "column", "to", "change", "values", "from", "say", "numberic", "to", "nominal", "based", "on", "some", "range" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L635-L641
31,927
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.addColumns
public void addColumns(ArrayList<String> columns, String defaultValue) { CompactCharSequence dv = new CompactCharSequence(defaultValue); for (int i = 0; i < data.length; i++) { CompactCharSequence[] row = data[i]; int oldrowlength = data[i].length; data[i] = (CompactCharSequence[]) resizeArray(row, oldrowl...
java
public void addColumns(ArrayList<String> columns, String defaultValue) { CompactCharSequence dv = new CompactCharSequence(defaultValue); for (int i = 0; i < data.length; i++) { CompactCharSequence[] row = data[i]; int oldrowlength = data[i].length; data[i] = (CompactCharSequence[]) resizeArray(row, oldrowl...
[ "public", "void", "addColumns", "(", "ArrayList", "<", "String", ">", "columns", ",", "String", "defaultValue", ")", "{", "CompactCharSequence", "dv", "=", "new", "CompactCharSequence", "(", "defaultValue", ")", ";", "for", "(", "int", "i", "=", "0", ";", ...
Add columns to worksheet and set default value @param columns @param defaultValue
[ "Add", "columns", "to", "worksheet", "and", "set", "default", "value" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L660-L689
31,928
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.addRows
public void addRows(ArrayList<String> rows, String defaultValue) { CompactCharSequence dv = new CompactCharSequence(defaultValue); int oldlength = data.length; int numColumns = 0; if (data.length > 0 && data[0] != null) { numColumns = data[0].length; } data = (CompactCharSequence[][]) resizeArray(data, d...
java
public void addRows(ArrayList<String> rows, String defaultValue) { CompactCharSequence dv = new CompactCharSequence(defaultValue); int oldlength = data.length; int numColumns = 0; if (data.length > 0 && data[0] != null) { numColumns = data[0].length; } data = (CompactCharSequence[][]) resizeArray(data, d...
[ "public", "void", "addRows", "(", "ArrayList", "<", "String", ">", "rows", ",", "String", "defaultValue", ")", "{", "CompactCharSequence", "dv", "=", "new", "CompactCharSequence", "(", "defaultValue", ")", ";", "int", "oldlength", "=", "data", ".", "length", ...
Add rows to the worksheet and fill in default value @param rows @param defaultValue
[ "Add", "rows", "to", "the", "worksheet", "and", "fill", "in", "default", "value" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L708-L724
31,929
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.resizeArray
private static Object resizeArray(Object oldArray, int newSize) { int oldSize = java.lang.reflect.Array.getLength(oldArray); Class<?> elementType = oldArray.getClass().getComponentType(); Object newArray = java.lang.reflect.Array.newInstance( elementType, newSize); int preserveLength = Math.min(oldSize, new...
java
private static Object resizeArray(Object oldArray, int newSize) { int oldSize = java.lang.reflect.Array.getLength(oldArray); Class<?> elementType = oldArray.getClass().getComponentType(); Object newArray = java.lang.reflect.Array.newInstance( elementType, newSize); int preserveLength = Math.min(oldSize, new...
[ "private", "static", "Object", "resizeArray", "(", "Object", "oldArray", ",", "int", "newSize", ")", "{", "int", "oldSize", "=", "java", ".", "lang", ".", "reflect", ".", "Array", ".", "getLength", "(", "oldArray", ")", ";", "Class", "<", "?", ">", "el...
Reallocates an array with a new size, and copies the contents of the old array to the new array. @param oldArray the old array, to be reallocated. @param newSize the new array size. @return A new array with the same contents.
[ "Reallocates", "an", "array", "with", "a", "new", "size", "and", "copies", "the", "contents", "of", "the", "old", "array", "to", "the", "new", "array", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L734-L744
31,930
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.addCell
public void addCell(String row, String col, String value) throws Exception { HeaderInfo rowIndex = rowLookup.get(row); HeaderInfo colIndex = columnLookup.get(col); if (rowIndex == null) { throw new Exception("Row " + row + " not found in worksheet"); } if (colIndex == null) { throw new Exception("Column...
java
public void addCell(String row, String col, String value) throws Exception { HeaderInfo rowIndex = rowLookup.get(row); HeaderInfo colIndex = columnLookup.get(col); if (rowIndex == null) { throw new Exception("Row " + row + " not found in worksheet"); } if (colIndex == null) { throw new Exception("Column...
[ "public", "void", "addCell", "(", "String", "row", ",", "String", "col", ",", "String", "value", ")", "throws", "Exception", "{", "HeaderInfo", "rowIndex", "=", "rowLookup", ".", "get", "(", "row", ")", ";", "HeaderInfo", "colIndex", "=", "columnLookup", "...
Add data to a cell @param row @param col @param value @throws Exception
[ "Add", "data", "to", "a", "cell" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L754-L766
31,931
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.getCell
public String getCell(String row, String col) throws Exception { if (col.equals(this.getIndexColumnName())) { return row; } HeaderInfo rowIndex = rowLookup.get(row); HeaderInfo colIndex = columnLookup.get(col); if (rowIndex == null) { //allow for case insentive search for (String rowtable : rowLooku...
java
public String getCell(String row, String col) throws Exception { if (col.equals(this.getIndexColumnName())) { return row; } HeaderInfo rowIndex = rowLookup.get(row); HeaderInfo colIndex = columnLookup.get(col); if (rowIndex == null) { //allow for case insentive search for (String rowtable : rowLooku...
[ "public", "String", "getCell", "(", "String", "row", ",", "String", "col", ")", "throws", "Exception", "{", "if", "(", "col", ".", "equals", "(", "this", ".", "getIndexColumnName", "(", ")", ")", ")", "{", "return", "row", ";", "}", "HeaderInfo", "rowI...
Get cell value @param row @param col @return @throws Exception
[ "Get", "cell", "value" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L865-L905
31,932
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.changeColumnsHeaders
public void changeColumnsHeaders(LinkedHashMap<String, String> newColumnValues) throws Exception { for (String oldColumn : newColumnValues.keySet()) { String newColumn = newColumnValues.get(oldColumn); changeColumnHeader(oldColumn, newColumn); } }
java
public void changeColumnsHeaders(LinkedHashMap<String, String> newColumnValues) throws Exception { for (String oldColumn : newColumnValues.keySet()) { String newColumn = newColumnValues.get(oldColumn); changeColumnHeader(oldColumn, newColumn); } }
[ "public", "void", "changeColumnsHeaders", "(", "LinkedHashMap", "<", "String", ",", "String", ">", "newColumnValues", ")", "throws", "Exception", "{", "for", "(", "String", "oldColumn", ":", "newColumnValues", ".", "keySet", "(", ")", ")", "{", "String", "newC...
Change the columns in the HashMap Key to the name of the value @param newColumnValues @throws Exception
[ "Change", "the", "columns", "in", "the", "HashMap", "Key", "to", "the", "name", "of", "the", "value" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L960-L966
31,933
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.getAllColumns
public ArrayList<String> getAllColumns() { ArrayList<String> columns = new ArrayList<String>(); for (String col : columnLookup.keySet()) { columns.add(col); } return columns; }
java
public ArrayList<String> getAllColumns() { ArrayList<String> columns = new ArrayList<String>(); for (String col : columnLookup.keySet()) { columns.add(col); } return columns; }
[ "public", "ArrayList", "<", "String", ">", "getAllColumns", "(", ")", "{", "ArrayList", "<", "String", ">", "columns", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "for", "(", "String", "col", ":", "columnLookup", ".", "keySet", "(", ")"...
Get the list of column names including those that may be hidden @return
[ "Get", "the", "list", "of", "column", "names", "including", "those", "that", "may", "be", "hidden" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1053-L1059
31,934
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.getColumns
public ArrayList<String> getColumns() { ArrayList<String> columns = new ArrayList<String>(); for (String col : columnLookup.keySet()) { HeaderInfo hi = columnLookup.get(col); if (!hi.isHide()) { columns.add(col); } } return columns; }
java
public ArrayList<String> getColumns() { ArrayList<String> columns = new ArrayList<String>(); for (String col : columnLookup.keySet()) { HeaderInfo hi = columnLookup.get(col); if (!hi.isHide()) { columns.add(col); } } return columns; }
[ "public", "ArrayList", "<", "String", ">", "getColumns", "(", ")", "{", "ArrayList", "<", "String", ">", "columns", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "for", "(", "String", "col", ":", "columnLookup", ".", "keySet", "(", ")", ...
Get the list of column names. Does not include hidden columns @return
[ "Get", "the", "list", "of", "column", "names", ".", "Does", "not", "include", "hidden", "columns" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1066-L1075
31,935
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.getDiscreteColumnValues
public ArrayList<String> getDiscreteColumnValues(String column) throws Exception { HashMap<String, String> hashMapValues = new HashMap<String, String>(); ArrayList<String> values = new ArrayList<String>(); ArrayList<String> rows = getDataRows(); for (String row : rows) { String value = getCell(row, column); ...
java
public ArrayList<String> getDiscreteColumnValues(String column) throws Exception { HashMap<String, String> hashMapValues = new HashMap<String, String>(); ArrayList<String> values = new ArrayList<String>(); ArrayList<String> rows = getDataRows(); for (String row : rows) { String value = getCell(row, column); ...
[ "public", "ArrayList", "<", "String", ">", "getDiscreteColumnValues", "(", "String", "column", ")", "throws", "Exception", "{", "HashMap", "<", "String", ",", "String", ">", "hashMapValues", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")",...
Get back a list of unique values in the column @param column @return @throws Exception
[ "Get", "back", "a", "list", "of", "unique", "values", "in", "the", "column" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1084-L1096
31,936
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.getDiscreteRowValues
public ArrayList<String> getDiscreteRowValues(String row) throws Exception { HashMap<String, String> hashMapValues = new HashMap<String, String>(); ArrayList<String> values = new ArrayList<String>(); for (String column : getColumns()) { String value = getCell(row, column); if (!hashMapValues.containsKey(val...
java
public ArrayList<String> getDiscreteRowValues(String row) throws Exception { HashMap<String, String> hashMapValues = new HashMap<String, String>(); ArrayList<String> values = new ArrayList<String>(); for (String column : getColumns()) { String value = getCell(row, column); if (!hashMapValues.containsKey(val...
[ "public", "ArrayList", "<", "String", ">", "getDiscreteRowValues", "(", "String", "row", ")", "throws", "Exception", "{", "HashMap", "<", "String", ",", "String", ">", "hashMapValues", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", ";"...
Get back a list of unique values in the row @param row @return @throws Exception
[ "Get", "back", "a", "list", "of", "unique", "values", "in", "the", "row" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1105-L1116
31,937
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.getAllRows
public ArrayList<String> getAllRows() { ArrayList<String> rows = new ArrayList<String>(); for (String row : rowLookup.keySet()) { rows.add(row); } return rows; }
java
public ArrayList<String> getAllRows() { ArrayList<String> rows = new ArrayList<String>(); for (String row : rowLookup.keySet()) { rows.add(row); } return rows; }
[ "public", "ArrayList", "<", "String", ">", "getAllRows", "(", ")", "{", "ArrayList", "<", "String", ">", "rows", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "for", "(", "String", "row", ":", "rowLookup", ".", "keySet", "(", ")", ")", ...
Get all rows including those that may be hidden @return
[ "Get", "all", "rows", "including", "those", "that", "may", "be", "hidden" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1123-L1130
31,938
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.getRows
public ArrayList<String> getRows() { ArrayList<String> rows = new ArrayList<String>(); for (String row : rowLookup.keySet()) { HeaderInfo hi = rowLookup.get(row); if (!hi.isHide()) { rows.add(row); } } return rows; }
java
public ArrayList<String> getRows() { ArrayList<String> rows = new ArrayList<String>(); for (String row : rowLookup.keySet()) { HeaderInfo hi = rowLookup.get(row); if (!hi.isHide()) { rows.add(row); } } return rows; }
[ "public", "ArrayList", "<", "String", ">", "getRows", "(", ")", "{", "ArrayList", "<", "String", ">", "rows", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "for", "(", "String", "row", ":", "rowLookup", ".", "keySet", "(", ")", ")", "...
Get the list of row names. Will exclude hidden values @return
[ "Get", "the", "list", "of", "row", "names", ".", "Will", "exclude", "hidden", "values" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1137-L1146
31,939
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.getDataRows
public ArrayList<String> getDataRows() { ArrayList<String> rows = new ArrayList<String>(); for (String row : rowLookup.keySet()) { if (this.isMetaDataRow(row)) { continue; } HeaderInfo hi = rowLookup.get(row); if (!hi.isHide()) { rows.add(row); } } return rows; }
java
public ArrayList<String> getDataRows() { ArrayList<String> rows = new ArrayList<String>(); for (String row : rowLookup.keySet()) { if (this.isMetaDataRow(row)) { continue; } HeaderInfo hi = rowLookup.get(row); if (!hi.isHide()) { rows.add(row); } } return rows; }
[ "public", "ArrayList", "<", "String", ">", "getDataRows", "(", ")", "{", "ArrayList", "<", "String", ">", "rows", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "for", "(", "String", "row", ":", "rowLookup", ".", "keySet", "(", ")", ")",...
Get the list of row names @return
[ "Get", "the", "list", "of", "row", "names" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1153-L1165
31,940
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.getLogScale
public WorkSheet getLogScale(double base, double zeroValue) throws Exception { WorkSheet workSheet = new WorkSheet(getRows(), getColumns()); workSheet.setIndexColumnName(this.getIndexColumnName()); ArrayList<String> rows = getRows(); ArrayList<String> columns = getColumns(); for (String row : rows) { for ...
java
public WorkSheet getLogScale(double base, double zeroValue) throws Exception { WorkSheet workSheet = new WorkSheet(getRows(), getColumns()); workSheet.setIndexColumnName(this.getIndexColumnName()); ArrayList<String> rows = getRows(); ArrayList<String> columns = getColumns(); for (String row : rows) { for ...
[ "public", "WorkSheet", "getLogScale", "(", "double", "base", ",", "double", "zeroValue", ")", "throws", "Exception", "{", "WorkSheet", "workSheet", "=", "new", "WorkSheet", "(", "getRows", "(", ")", ",", "getColumns", "(", ")", ")", ";", "workSheet", ".", ...
Get the log scale of this worksheet @param base @return @throws Exception
[ "Get", "the", "log", "scale", "of", "this", "worksheet" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1187-L1221
31,941
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.swapRowAndColumns
public WorkSheet swapRowAndColumns() throws Exception { WorkSheet swappedWorkSheet = new WorkSheet(getColumns(), getRows()); for (String row : getRows()) { for (String col : getColumns()) { String value = getCell(row, col); swappedWorkSheet.addCell(col, row, value); } } ArrayList<String> metadat...
java
public WorkSheet swapRowAndColumns() throws Exception { WorkSheet swappedWorkSheet = new WorkSheet(getColumns(), getRows()); for (String row : getRows()) { for (String col : getColumns()) { String value = getCell(row, col); swappedWorkSheet.addCell(col, row, value); } } ArrayList<String> metadat...
[ "public", "WorkSheet", "swapRowAndColumns", "(", ")", "throws", "Exception", "{", "WorkSheet", "swappedWorkSheet", "=", "new", "WorkSheet", "(", "getColumns", "(", ")", ",", "getRows", "(", ")", ")", ";", "for", "(", "String", "row", ":", "getRows", "(", "...
Swap the row and columns returning a new worksheet @return @throws Exception
[ "Swap", "the", "row", "and", "columns", "returning", "a", "new", "worksheet" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1229-L1244
31,942
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.getAllValuesCompactCharSequence
static CompactCharSequence[][] getAllValuesCompactCharSequence(InputStream is, char delimiter) throws Exception { // FileReader reader = new FileReader(fileName); BufferedReader br = new BufferedReader(new InputStreamReader(is)); ArrayList<CompactCharSequence[]> rows = new ArrayList<CompactCharSequence[]>(); ...
java
static CompactCharSequence[][] getAllValuesCompactCharSequence(InputStream is, char delimiter) throws Exception { // FileReader reader = new FileReader(fileName); BufferedReader br = new BufferedReader(new InputStreamReader(is)); ArrayList<CompactCharSequence[]> rows = new ArrayList<CompactCharSequence[]>(); ...
[ "static", "CompactCharSequence", "[", "]", "[", "]", "getAllValuesCompactCharSequence", "(", "InputStream", "is", ",", "char", "delimiter", ")", "throws", "Exception", "{", "// FileReader reader = new FileReader(fileName);", "BufferedReader", "br", "=", "new", "BufferedRe...
All support for loading from a jar file @param is @param delimiter @return @throws Exception
[ "All", "support", "for", "loading", "from", "a", "jar", "file" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1259-L1307
31,943
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.unionWorkSheetsRowJoin
static public WorkSheet unionWorkSheetsRowJoin(String w1FileName, String w2FileName, char delimitter, boolean secondSheetMetaData) throws Exception { WorkSheet w1 = WorkSheet.readCSV(w1FileName, delimitter); WorkSheet w2 = WorkSheet.readCSV(w2FileName, delimitter); return unionWorkSheetsRowJoin(w1, w2, secondShee...
java
static public WorkSheet unionWorkSheetsRowJoin(String w1FileName, String w2FileName, char delimitter, boolean secondSheetMetaData) throws Exception { WorkSheet w1 = WorkSheet.readCSV(w1FileName, delimitter); WorkSheet w2 = WorkSheet.readCSV(w2FileName, delimitter); return unionWorkSheetsRowJoin(w1, w2, secondShee...
[ "static", "public", "WorkSheet", "unionWorkSheetsRowJoin", "(", "String", "w1FileName", ",", "String", "w2FileName", ",", "char", "delimitter", ",", "boolean", "secondSheetMetaData", ")", "throws", "Exception", "{", "WorkSheet", "w1", "=", "WorkSheet", ".", "readCSV...
Combine two work sheets where you join based on rows. Rows that are found in one but not the other are removed. If the second sheet is meta data then a meta data column will be added between the two joined columns @param w1FileName @param w2FileName @param delimitter @param secondSheetMetaData @return @throws Exceptio...
[ "Combine", "two", "work", "sheets", "where", "you", "join", "based", "on", "rows", ".", "Rows", "that", "are", "found", "in", "one", "but", "not", "the", "other", "are", "removed", ".", "If", "the", "second", "sheet", "is", "meta", "data", "then", "a",...
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1358-L1363
31,944
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.saveCSV
public void saveCSV(String fileName) throws Exception { File f = new File(fileName); File parentFile = f.getParentFile(); if (!parentFile.isDirectory()) { parentFile.mkdirs(); } FileOutputStream file = new FileOutputStream(fileName); BufferedOutputStream bs = new BufferedOutputStream(file); save(bs, ',...
java
public void saveCSV(String fileName) throws Exception { File f = new File(fileName); File parentFile = f.getParentFile(); if (!parentFile.isDirectory()) { parentFile.mkdirs(); } FileOutputStream file = new FileOutputStream(fileName); BufferedOutputStream bs = new BufferedOutputStream(file); save(bs, ',...
[ "public", "void", "saveCSV", "(", "String", "fileName", ")", "throws", "Exception", "{", "File", "f", "=", "new", "File", "(", "fileName", ")", ";", "File", "parentFile", "=", "f", ".", "getParentFile", "(", ")", ";", "if", "(", "!", "parentFile", ".",...
Save the worksheet as a csv file @param fileName @throws Exception
[ "Save", "the", "worksheet", "as", "a", "csv", "file" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1489-L1500
31,945
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.appendWorkSheetColumns
public void appendWorkSheetColumns(WorkSheet worksheet) throws Exception { ArrayList<String> newColumns = worksheet.getColumns(); this.addColumns(newColumns, ""); ArrayList<String> rows = this.getRows(); for (String row : rows) { for (String col : newColumns) { if (worksheet.isValidRow(row)) { Str...
java
public void appendWorkSheetColumns(WorkSheet worksheet) throws Exception { ArrayList<String> newColumns = worksheet.getColumns(); this.addColumns(newColumns, ""); ArrayList<String> rows = this.getRows(); for (String row : rows) { for (String col : newColumns) { if (worksheet.isValidRow(row)) { Str...
[ "public", "void", "appendWorkSheetColumns", "(", "WorkSheet", "worksheet", ")", "throws", "Exception", "{", "ArrayList", "<", "String", ">", "newColumns", "=", "worksheet", ".", "getColumns", "(", ")", ";", "this", ".", "addColumns", "(", "newColumns", ",", "\...
Add columns from a second worksheet to be joined by common row. If the appended worksheet doesn't contain a row in the master worksheet then default value of "" is used. Rows in the appended worksheet not found in the master worksheet are not added. @param worksheet @throws Exception
[ "Add", "columns", "from", "a", "second", "worksheet", "to", "be", "joined", "by", "common", "row", ".", "If", "the", "appended", "worksheet", "doesn", "t", "contain", "a", "row", "in", "the", "master", "worksheet", "then", "default", "value", "of", "is", ...
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1538-L1556
31,946
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.appendWorkSheetRows
public void appendWorkSheetRows(WorkSheet worksheet) throws Exception { ArrayList<String> newRows = worksheet.getRows(); this.addRows(newRows, ""); for (String col : this.getColumns()) { if (!worksheet.isValidColumn(col)) { continue; } for (String row : newRows) { if (worksheet.isValidColumn(co...
java
public void appendWorkSheetRows(WorkSheet worksheet) throws Exception { ArrayList<String> newRows = worksheet.getRows(); this.addRows(newRows, ""); for (String col : this.getColumns()) { if (!worksheet.isValidColumn(col)) { continue; } for (String row : newRows) { if (worksheet.isValidColumn(co...
[ "public", "void", "appendWorkSheetRows", "(", "WorkSheet", "worksheet", ")", "throws", "Exception", "{", "ArrayList", "<", "String", ">", "newRows", "=", "worksheet", ".", "getRows", "(", ")", ";", "this", ".", "addRows", "(", "newRows", ",", "\"\"", ")", ...
Add rows from a second worksheet to be joined by common column. If the appended worksheet doesn't contain a column in the master worksheet then default value of "" is used. Columns in the appended worksheet not found in the master worksheet are not added. @param worksheet @throws Exception
[ "Add", "rows", "from", "a", "second", "worksheet", "to", "be", "joined", "by", "common", "column", ".", "If", "the", "appended", "worksheet", "doesn", "t", "contain", "a", "column", "in", "the", "master", "worksheet", "then", "default", "value", "of", "is"...
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1567-L1585
31,947
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfActions.java
MmtfActions.readFromFile
public static Structure readFromFile(Path filePath) throws IOException { // Get the reader - this is the bit that people need to implement. MmtfStructureReader mmtfStructureReader = new MmtfStructureReader(); // Do the inflation new StructureDataToAdapter(new GenericDecoder(ReaderUtils.getDataFromFile(filePath)...
java
public static Structure readFromFile(Path filePath) throws IOException { // Get the reader - this is the bit that people need to implement. MmtfStructureReader mmtfStructureReader = new MmtfStructureReader(); // Do the inflation new StructureDataToAdapter(new GenericDecoder(ReaderUtils.getDataFromFile(filePath)...
[ "public", "static", "Structure", "readFromFile", "(", "Path", "filePath", ")", "throws", "IOException", "{", "// Get the reader - this is the bit that people need to implement.", "MmtfStructureReader", "mmtfStructureReader", "=", "new", "MmtfStructureReader", "(", ")", ";", "...
Get a Structure object from a mmtf file. @param filePath the mmtf file @return a Structure object relating to the input byte array. @throws IOException
[ "Get", "a", "Structure", "object", "from", "a", "mmtf", "file", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfActions.java#L48-L55
31,948
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfActions.java
MmtfActions.writeToFile
public static void writeToFile(Structure structure, Path path) throws IOException { // Set up this writer AdapterToStructureData writerToEncoder = new AdapterToStructureData(); // Get the writer - this is what people implement new MmtfStructureWriter(structure, writerToEncoder); // Now write this data to file...
java
public static void writeToFile(Structure structure, Path path) throws IOException { // Set up this writer AdapterToStructureData writerToEncoder = new AdapterToStructureData(); // Get the writer - this is what people implement new MmtfStructureWriter(structure, writerToEncoder); // Now write this data to file...
[ "public", "static", "void", "writeToFile", "(", "Structure", "structure", ",", "Path", "path", ")", "throws", "IOException", "{", "// Set up this writer", "AdapterToStructureData", "writerToEncoder", "=", "new", "AdapterToStructureData", "(", ")", ";", "// Get the write...
Write a Structure object to a file. @param structure the Structure to write @param path the file to write @throws IOException
[ "Write", "a", "Structure", "object", "to", "a", "file", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfActions.java#L63-L70
31,949
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfActions.java
MmtfActions.readFromWeb
public static Structure readFromWeb(String pdbId) throws IOException { // Get the reader - this is the bit that people need to implement. MmtfStructureReader mmtfStructureReader = new MmtfStructureReader(); // Do the inflation new StructureDataToAdapter(new GenericDecoder(ReaderUtils.getDataFromUrl(pdbId)), mmt...
java
public static Structure readFromWeb(String pdbId) throws IOException { // Get the reader - this is the bit that people need to implement. MmtfStructureReader mmtfStructureReader = new MmtfStructureReader(); // Do the inflation new StructureDataToAdapter(new GenericDecoder(ReaderUtils.getDataFromUrl(pdbId)), mmt...
[ "public", "static", "Structure", "readFromWeb", "(", "String", "pdbId", ")", "throws", "IOException", "{", "// Get the reader - this is the bit that people need to implement.", "MmtfStructureReader", "mmtfStructureReader", "=", "new", "MmtfStructureReader", "(", ")", ";", "//...
Get a Biojava structure from the mmtf REST service. @param pdbId the PDB code of the required structure @return a Structure object relating to the input byte array @throws IOException
[ "Get", "a", "Biojava", "structure", "from", "the", "mmtf", "REST", "service", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfActions.java#L95-L102
31,950
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/MultipleAlignmentEnsembleImpl.java
MultipleAlignmentEnsembleImpl.updateDistanceMatrix
public void updateDistanceMatrix() { // Reset the distance Matrix variable distanceMatrix = new ArrayList<Matrix>(); for (int s = 0; s < size(); s++) { Atom[] ca = atomArrays.get(s); Matrix distMat = AlignUtils.getDistanceMatrix(ca, ca); distanceMatrix.add(distMat); } }
java
public void updateDistanceMatrix() { // Reset the distance Matrix variable distanceMatrix = new ArrayList<Matrix>(); for (int s = 0; s < size(); s++) { Atom[] ca = atomArrays.get(s); Matrix distMat = AlignUtils.getDistanceMatrix(ca, ca); distanceMatrix.add(distMat); } }
[ "public", "void", "updateDistanceMatrix", "(", ")", "{", "// Reset the distance Matrix variable", "distanceMatrix", "=", "new", "ArrayList", "<", "Matrix", ">", "(", ")", ";", "for", "(", "int", "s", "=", "0", ";", "s", "<", "size", "(", ")", ";", "s", "...
Force recalculation of the distance matrices.
[ "Force", "recalculation", "of", "the", "distance", "matrices", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/MultipleAlignmentEnsembleImpl.java#L346-L356
31,951
biojava/biojava
biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatProperties.java
ProfeatProperties.getComposition
public static double getComposition(ProteinSequence sequence, ATTRIBUTE attribute, GROUPING group) throws Exception{ return new ProfeatPropertiesImpl().getComposition(sequence, attribute, group); }
java
public static double getComposition(ProteinSequence sequence, ATTRIBUTE attribute, GROUPING group) throws Exception{ return new ProfeatPropertiesImpl().getComposition(sequence, attribute, group); }
[ "public", "static", "double", "getComposition", "(", "ProteinSequence", "sequence", ",", "ATTRIBUTE", "attribute", ",", "GROUPING", "group", ")", "throws", "Exception", "{", "return", "new", "ProfeatPropertiesImpl", "(", ")", ".", "getComposition", "(", "sequence", ...
An adaptor method which returns the composition of the specific grouping for the given attribute. @param sequence a protein sequence consisting of non-ambiguous characters only @param attribute one of the seven attributes (Hydrophobicity, Volume, Polarity, Polarizability, Charge, SecondaryStructure or SolventAccessibi...
[ "An", "adaptor", "method", "which", "returns", "the", "composition", "of", "the", "specific", "grouping", "for", "the", "given", "attribute", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatProperties.java#L56-L58
31,952
biojava/biojava
biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatProperties.java
ProfeatProperties.getTransition
public static double getTransition(ProteinSequence sequence, ATTRIBUTE attribute, TRANSITION transition) throws Exception{ return new ProfeatPropertiesImpl().getTransition(sequence, attribute, transition); }
java
public static double getTransition(ProteinSequence sequence, ATTRIBUTE attribute, TRANSITION transition) throws Exception{ return new ProfeatPropertiesImpl().getTransition(sequence, attribute, transition); }
[ "public", "static", "double", "getTransition", "(", "ProteinSequence", "sequence", ",", "ATTRIBUTE", "attribute", ",", "TRANSITION", "transition", ")", "throws", "Exception", "{", "return", "new", "ProfeatPropertiesImpl", "(", ")", ".", "getTransition", "(", "sequen...
An adaptor method which returns the number of transition between the specified groups for the given attribute with respect to the length of sequence. @param sequence a protein sequence consisting of non-ambiguous characters only @param attribute one of the seven attributes (Hydrophobicity, Volume, Polarity, Polarizabi...
[ "An", "adaptor", "method", "which", "returns", "the", "number", "of", "transition", "between", "the", "specified", "groups", "for", "the", "given", "attribute", "with", "respect", "to", "the", "length", "of", "sequence", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/ProfeatProperties.java#L94-L96
31,953
biojava/biojava
biojava-alignment/src/main/java/org/biojava/nbio/alignment/template/AbstractMatrixAligner.java
AbstractMatrixAligner.getScoreMatrix
@Override public int[][][] getScoreMatrix() { boolean tempStoringScoreMatrix = storingScoreMatrix; if (scores == null) { storingScoreMatrix = true; align(); if (scores == null) { return null; } } int[][][] copy = scores; if (tempStoringScoreMatrix) { copy = new int[scores.length][scores[0]...
java
@Override public int[][][] getScoreMatrix() { boolean tempStoringScoreMatrix = storingScoreMatrix; if (scores == null) { storingScoreMatrix = true; align(); if (scores == null) { return null; } } int[][][] copy = scores; if (tempStoringScoreMatrix) { copy = new int[scores.length][scores[0]...
[ "@", "Override", "public", "int", "[", "]", "[", "]", "[", "]", "getScoreMatrix", "(", ")", "{", "boolean", "tempStoringScoreMatrix", "=", "storingScoreMatrix", ";", "if", "(", "scores", "==", "null", ")", "{", "storingScoreMatrix", "=", "true", ";", "alig...
methods for MatrixAligner
[ "methods", "for", "MatrixAligner" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-alignment/src/main/java/org/biojava/nbio/alignment/template/AbstractMatrixAligner.java#L188-L209
31,954
biojava/biojava
biojava-alignment/src/main/java/org/biojava/nbio/alignment/template/AbstractMatrixAligner.java
AbstractMatrixAligner.getSubstitutionScoreVector
protected int[] getSubstitutionScoreVector(int queryColumn, Subproblem subproblem) { int[] subs = new int[subproblem.getTargetEndIndex() + 1]; if (queryColumn > 0) { for (int y = Math.max(1, subproblem.getTargetStartIndex()); y <= subproblem.getTargetEndIndex(); y++) { subs[y] = getSubstitutionScore(queryCol...
java
protected int[] getSubstitutionScoreVector(int queryColumn, Subproblem subproblem) { int[] subs = new int[subproblem.getTargetEndIndex() + 1]; if (queryColumn > 0) { for (int y = Math.max(1, subproblem.getTargetStartIndex()); y <= subproblem.getTargetEndIndex(); y++) { subs[y] = getSubstitutionScore(queryCol...
[ "protected", "int", "[", "]", "getSubstitutionScoreVector", "(", "int", "queryColumn", ",", "Subproblem", "subproblem", ")", "{", "int", "[", "]", "subs", "=", "new", "int", "[", "subproblem", ".", "getTargetEndIndex", "(", ")", "+", "1", "]", ";", "if", ...
Returns score for the alignment of the query column to all target columns @param queryColumn @param subproblem @return
[ "Returns", "score", "for", "the", "alignment", "of", "the", "query", "column", "to", "all", "target", "columns" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-alignment/src/main/java/org/biojava/nbio/alignment/template/AbstractMatrixAligner.java#L382-L390
31,955
biojava/biojava
biojava-alignment/src/main/java/org/biojava/nbio/alignment/template/AbstractMatrixAligner.java
AbstractMatrixAligner.reset
protected void reset() { xyMax = new int[] {0, 0}; xyStart = new int[] {0, 0}; scores = null; types = (gapPenalty == null || gapPenalty.getType() == GapPenalty.Type.LINEAR) ? new String[] { null } : new String[] { "Substitution", "Deletion", "Insertion" }; time = -1; profile = null; }
java
protected void reset() { xyMax = new int[] {0, 0}; xyStart = new int[] {0, 0}; scores = null; types = (gapPenalty == null || gapPenalty.getType() == GapPenalty.Type.LINEAR) ? new String[] { null } : new String[] { "Substitution", "Deletion", "Insertion" }; time = -1; profile = null; }
[ "protected", "void", "reset", "(", ")", "{", "xyMax", "=", "new", "int", "[", "]", "{", "0", ",", "0", "}", ";", "xyStart", "=", "new", "int", "[", "]", "{", "0", ",", "0", "}", ";", "scores", "=", "null", ";", "types", "=", "(", "gapPenalty"...
Resets output fields; should be overridden to set max and min
[ "Resets", "output", "fields", ";", "should", "be", "overridden", "to", "set", "max", "and", "min" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-alignment/src/main/java/org/biojava/nbio/alignment/template/AbstractMatrixAligner.java#L395-L403
31,956
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/UnitQuaternions.java
UnitQuaternions.angle
public static double angle(Quat4d q) { AxisAngle4d axis = new AxisAngle4d(); axis.set(q); return axis.angle; }
java
public static double angle(Quat4d q) { AxisAngle4d axis = new AxisAngle4d(); axis.set(q); return axis.angle; }
[ "public", "static", "double", "angle", "(", "Quat4d", "q", ")", "{", "AxisAngle4d", "axis", "=", "new", "AxisAngle4d", "(", ")", ";", "axis", ".", "set", "(", "q", ")", ";", "return", "axis", ".", "angle", ";", "}" ]
Calculate the rotation angle component of the input unit quaternion. @param q unit quaternion Quat4d @return the angle in radians of the input quaternion
[ "Calculate", "the", "rotation", "angle", "component", "of", "the", "input", "unit", "quaternion", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/UnitQuaternions.java#L134-L138
31,957
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/UnitQuaternions.java
UnitQuaternions.relativeOrientation
public static Quat4d relativeOrientation(Point3d[] fixed, Point3d[] moved) { Matrix m = CalcPoint.formMatrix(moved, fixed); // inverse EigenvalueDecomposition eig = m.eig(); double[][] v = eig.getV().getArray(); Quat4d q = new Quat4d(v[1][3], v[2][3], v[3][3], v[0][3]); q.normalize(); q.conjugate(); retur...
java
public static Quat4d relativeOrientation(Point3d[] fixed, Point3d[] moved) { Matrix m = CalcPoint.formMatrix(moved, fixed); // inverse EigenvalueDecomposition eig = m.eig(); double[][] v = eig.getV().getArray(); Quat4d q = new Quat4d(v[1][3], v[2][3], v[3][3], v[0][3]); q.normalize(); q.conjugate(); retur...
[ "public", "static", "Quat4d", "relativeOrientation", "(", "Point3d", "[", "]", "fixed", ",", "Point3d", "[", "]", "moved", ")", "{", "Matrix", "m", "=", "CalcPoint", ".", "formMatrix", "(", "moved", ",", "fixed", ")", ";", "// inverse", "EigenvalueDecomposit...
Calculate the relative quaternion orientation of two arrays of points. @param fixed point array, coordinates will not be modified @param moved point array, coordinates will not be modified @return a unit quaternion representing the relative orientation, to rotate moved to bring it to the same orientation as fixed.
[ "Calculate", "the", "relative", "quaternion", "orientation", "of", "two", "arrays", "of", "points", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/UnitQuaternions.java#L199-L207
31,958
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/location/template/AbstractLocation.java
AbstractLocation.iterator
@Override public Iterator<Location> iterator() { List<Location> list; if(isComplex()) { list = getSubLocations(); } else { list = new ArrayList<Location>(); list.add(this); } return list.iterator(); }
java
@Override public Iterator<Location> iterator() { List<Location> list; if(isComplex()) { list = getSubLocations(); } else { list = new ArrayList<Location>(); list.add(this); } return list.iterator(); }
[ "@", "Override", "public", "Iterator", "<", "Location", ">", "iterator", "(", ")", "{", "List", "<", "Location", ">", "list", ";", "if", "(", "isComplex", "(", ")", ")", "{", "list", "=", "getSubLocations", "(", ")", ";", "}", "else", "{", "list", ...
Iterates through all known sub-locations for this location but does not descend
[ "Iterates", "through", "all", "known", "sub", "-", "locations", "for", "this", "location", "but", "does", "not", "descend" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/location/template/AbstractLocation.java#L220-L231
31,959
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/location/template/AbstractLocation.java
AbstractLocation.getAllSubLocations
private List<Location> getAllSubLocations(Location location) { List<Location> flatSubLocations = new ArrayList<Location>(); for (Location l : location.getSubLocations()) { if (l.isComplex()) { flatSubLocations.addAll(getAllSubLocations(l)); } else { flatSubLocations.add(l); } } return flatSu...
java
private List<Location> getAllSubLocations(Location location) { List<Location> flatSubLocations = new ArrayList<Location>(); for (Location l : location.getSubLocations()) { if (l.isComplex()) { flatSubLocations.addAll(getAllSubLocations(l)); } else { flatSubLocations.add(l); } } return flatSu...
[ "private", "List", "<", "Location", ">", "getAllSubLocations", "(", "Location", "location", ")", "{", "List", "<", "Location", ">", "flatSubLocations", "=", "new", "ArrayList", "<", "Location", ">", "(", ")", ";", "for", "(", "Location", "l", ":", "locatio...
Here to allow for recursion
[ "Here", "to", "allow", "for", "recursion" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/location/template/AbstractLocation.java#L247-L258
31,960
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/location/template/AbstractLocation.java
AbstractLocation.getSubSequence
@Override public <C extends Compound> Sequence<C> getSubSequence(Sequence<C> sequence) { if(isCircular()) { List<Sequence<C>> sequences = new ArrayList<Sequence<C>>(); for(Location l: this) { sequences.add(l.getSubSequence(sequence)); } return new JoiningSequenceReader<C>(sequence.getCompoundSet(), s...
java
@Override public <C extends Compound> Sequence<C> getSubSequence(Sequence<C> sequence) { if(isCircular()) { List<Sequence<C>> sequences = new ArrayList<Sequence<C>>(); for(Location l: this) { sequences.add(l.getSubSequence(sequence)); } return new JoiningSequenceReader<C>(sequence.getCompoundSet(), s...
[ "@", "Override", "public", "<", "C", "extends", "Compound", ">", "Sequence", "<", "C", ">", "getSubSequence", "(", "Sequence", "<", "C", ">", "sequence", ")", "{", "if", "(", "isCircular", "(", ")", ")", "{", "List", "<", "Sequence", "<", "C", ">>", ...
If circular this will return the sequence represented by the sub locations joined. If not circular then we get the Sequence for the outer-bounds defined by this location.
[ "If", "circular", "this", "will", "return", "the", "sequence", "represented", "by", "the", "sub", "locations", "joined", ".", "If", "not", "circular", "then", "we", "get", "the", "Sequence", "for", "the", "outer", "-", "bounds", "defined", "by", "this", "l...
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/location/template/AbstractLocation.java#L311-L322
31,961
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/location/template/AbstractLocation.java
AbstractLocation.canComplement
protected <C extends Compound> boolean canComplement(Sequence<C> sequence) { CompoundSet<C> compoundSet = sequence.getCompoundSet(); Compound c = compoundSet.getAllCompounds().iterator().next(); return ComplementCompound.class.isAssignableFrom(c.getClass()); }
java
protected <C extends Compound> boolean canComplement(Sequence<C> sequence) { CompoundSet<C> compoundSet = sequence.getCompoundSet(); Compound c = compoundSet.getAllCompounds().iterator().next(); return ComplementCompound.class.isAssignableFrom(c.getClass()); }
[ "protected", "<", "C", "extends", "Compound", ">", "boolean", "canComplement", "(", "Sequence", "<", "C", ">", "sequence", ")", "{", "CompoundSet", "<", "C", ">", "compoundSet", "=", "sequence", ".", "getCompoundSet", "(", ")", ";", "Compound", "c", "=", ...
Uses the Sequence's CompoundSet to decide if a compound can be assgined to ComplementCompound meaning it can complement
[ "Uses", "the", "Sequence", "s", "CompoundSet", "to", "decide", "if", "a", "compound", "can", "be", "assgined", "to", "ComplementCompound", "meaning", "it", "can", "complement" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/location/template/AbstractLocation.java#L363-L367
31,962
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/fatcat/calc/AFPChainer.java
AFPChainer.getRmsd
private static double getRmsd(int focusResn, int[] focusRes1, int[] focusRes2, AFPChain afpChain, Atom[] ca1, Atom[] ca2){ Atom[] tmp1 = new Atom[focusResn]; Atom[] tmp2 = new Atom[focusResn]; for ( int i =0 ; i< focusResn;i++){ tmp1[i] = ca1[focusRes1[i]]; tmp2[i] = (Atom)ca2[focusRes2[i]].clone(...
java
private static double getRmsd(int focusResn, int[] focusRes1, int[] focusRes2, AFPChain afpChain, Atom[] ca1, Atom[] ca2){ Atom[] tmp1 = new Atom[focusResn]; Atom[] tmp2 = new Atom[focusResn]; for ( int i =0 ; i< focusResn;i++){ tmp1[i] = ca1[focusRes1[i]]; tmp2[i] = (Atom)ca2[focusRes2[i]].clone(...
[ "private", "static", "double", "getRmsd", "(", "int", "focusResn", ",", "int", "[", "]", "focusRes1", ",", "int", "[", "]", "focusRes2", ",", "AFPChain", "afpChain", ",", "Atom", "[", "]", "ca1", ",", "Atom", "[", "]", "ca2", ")", "{", "Atom", "[", ...
the the RMSD for the residues defined in the two arrays @param focusResn @param focusRes1 @param focusRes2 @return
[ "the", "the", "RMSD", "for", "the", "residues", "defined", "in", "the", "two", "arrays" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/fatcat/calc/AFPChainer.java#L666-L694
31,963
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/fatcat/calc/AFPChainer.java
AFPChainer.getRmsd
private static double getRmsd(Atom[] catmp1, Atom[] catmp2) throws StructureException{ Matrix4d trans = SuperPositions.superpose(Calc.atomsToPoints(catmp1), Calc.atomsToPoints(catmp2)); Calc.transform(catmp2, trans); // if ( showAlig) { // StructureAlignmentJmol jmol = new StructureAlignmentJmol()...
java
private static double getRmsd(Atom[] catmp1, Atom[] catmp2) throws StructureException{ Matrix4d trans = SuperPositions.superpose(Calc.atomsToPoints(catmp1), Calc.atomsToPoints(catmp2)); Calc.transform(catmp2, trans); // if ( showAlig) { // StructureAlignmentJmol jmol = new StructureAlignmentJmol()...
[ "private", "static", "double", "getRmsd", "(", "Atom", "[", "]", "catmp1", ",", "Atom", "[", "]", "catmp2", ")", "throws", "StructureException", "{", "Matrix4d", "trans", "=", "SuperPositions", ".", "superpose", "(", "Calc", ".", "atomsToPoints", "(", "catmp...
Calculate the RMSD for two sets of atoms. Rotates the 2nd atom set so make sure this does not cause problems later @param catmp1 @return
[ "Calculate", "the", "RMSD", "for", "two", "sets", "of", "atoms", ".", "Rotates", "the", "2nd", "atom", "set", "so", "make", "sure", "this", "does", "not", "cause", "problems", "later" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/fatcat/calc/AFPChainer.java#L701-L744
31,964
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/geometry/SphereSampler.java
SphereSampler.pind
private static double pind(double ind, double delta, double sigma) { return (sigma == 0) ? ind * delta : Math.sinh(sigma * ind * delta) / sigma; }
java
private static double pind(double ind, double delta, double sigma) { return (sigma == 0) ? ind * delta : Math.sinh(sigma * ind * delta) / sigma; }
[ "private", "static", "double", "pind", "(", "double", "ind", ",", "double", "delta", ",", "double", "sigma", ")", "{", "return", "(", "sigma", "==", "0", ")", "?", "ind", "*", "delta", ":", "Math", ".", "sinh", "(", "sigma", "*", "ind", "*", "delta...
unit sphere.
[ "unit", "sphere", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/geometry/SphereSampler.java#L241-L244
31,965
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/MultipleSequenceAlignment.java
MultipleSequenceAlignment.addAlignedSequence
public void addAlignedSequence(S sequence){ if(length == null){ length = sequence.getLength(); } if(sequence.getLength() != length){ throw new IllegalArgumentException(sequence.getAccession() + " length = " + sequence.getLength() + " not equal to MSA length = " + length); } sequences.add(sequence);...
java
public void addAlignedSequence(S sequence){ if(length == null){ length = sequence.getLength(); } if(sequence.getLength() != length){ throw new IllegalArgumentException(sequence.getAccession() + " length = " + sequence.getLength() + " not equal to MSA length = " + length); } sequences.add(sequence);...
[ "public", "void", "addAlignedSequence", "(", "S", "sequence", ")", "{", "if", "(", "length", "==", "null", ")", "{", "length", "=", "sequence", ".", "getLength", "(", ")", ";", "}", "if", "(", "sequence", ".", "getLength", "(", ")", "!=", "length", "...
A sequence that has been aligned to other sequences will have inserts. @param sequence
[ "A", "sequence", "that", "has", "been", "aligned", "to", "other", "sequences", "will", "have", "inserts", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/MultipleSequenceAlignment.java#L52-L61
31,966
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/MultipleSequenceAlignment.java
MultipleSequenceAlignment.getCompoundsAt
@Override public List<C> getCompoundsAt(int alignmentIndex) { List<C> column = new ArrayList<C>(); for (S s : sequences) { column.add(s.getCompoundAt(alignmentIndex)); } return Collections.unmodifiableList(column); }
java
@Override public List<C> getCompoundsAt(int alignmentIndex) { List<C> column = new ArrayList<C>(); for (S s : sequences) { column.add(s.getCompoundAt(alignmentIndex)); } return Collections.unmodifiableList(column); }
[ "@", "Override", "public", "List", "<", "C", ">", "getCompoundsAt", "(", "int", "alignmentIndex", ")", "{", "List", "<", "C", ">", "column", "=", "new", "ArrayList", "<", "C", ">", "(", ")", ";", "for", "(", "S", "s", ":", "sequences", ")", "{", ...
Get a list of compounds at a sequence position @param alignmentIndex @return compounds
[ "Get", "a", "list", "of", "compounds", "at", "a", "sequence", "position" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/MultipleSequenceAlignment.java#L99-L106
31,967
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/SubstructureIdentifier.java
SubstructureIdentifier.getIdentifier
@Override public String getIdentifier() { if (ranges.isEmpty()) return pdbId; return pdbId + "." + ResidueRange.toString(ranges); }
java
@Override public String getIdentifier() { if (ranges.isEmpty()) return pdbId; return pdbId + "." + ResidueRange.toString(ranges); }
[ "@", "Override", "public", "String", "getIdentifier", "(", ")", "{", "if", "(", "ranges", ".", "isEmpty", "(", ")", ")", "return", "pdbId", ";", "return", "pdbId", "+", "\".\"", "+", "ResidueRange", ".", "toString", "(", "ranges", ")", ";", "}" ]
Get the String form of this identifier. This provides the canonical form for a StructureIdentifier and has all the information needed to recreate a particular substructure. Example: 3iek.A_17-28,A_56-294 @return The String form of this identifier
[ "Get", "the", "String", "form", "of", "this", "identifier", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/SubstructureIdentifier.java#L136-L140
31,968
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/cluster/SubunitExtractor.java
SubunitExtractor.calcAdjustedMinimumSequenceLength
private static int calcAdjustedMinimumSequenceLength( List<Subunit> subunits, int absMinLen, double fraction, int minLen) { int maxLength = Integer.MIN_VALUE; int minLength = Integer.MAX_VALUE; // Extract the length List, the min and the max List<Integer> lengths = new ArrayList<Integer>(); for (int i = ...
java
private static int calcAdjustedMinimumSequenceLength( List<Subunit> subunits, int absMinLen, double fraction, int minLen) { int maxLength = Integer.MIN_VALUE; int minLength = Integer.MAX_VALUE; // Extract the length List, the min and the max List<Integer> lengths = new ArrayList<Integer>(); for (int i = ...
[ "private", "static", "int", "calcAdjustedMinimumSequenceLength", "(", "List", "<", "Subunit", ">", "subunits", ",", "int", "absMinLen", ",", "double", "fraction", ",", "int", "minLen", ")", "{", "int", "maxLength", "=", "Integer", ".", "MIN_VALUE", ";", "int",...
Returns an adapted minimum sequence length. This method ensure that structure that only have short chains are not excluded by the minimumSequenceLength cutoff value. @return adjustedMinimumSequenceLength
[ "Returns", "an", "adapted", "minimum", "sequence", "length", ".", "This", "method", "ensure", "that", "structure", "that", "only", "have", "short", "chains", "are", "not", "excluded", "by", "the", "minimumSequenceLength", "cutoff", "value", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/cluster/SubunitExtractor.java#L103-L143
31,969
biojava/biojava
biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/convertor/Convertor.java
Convertor.convert
public String convert(ProteinSequence sequence){ String convertedSequence = ""; String uppercaseSequence = sequence.getSequenceAsString().toUpperCase(); for(int x = 0; x < uppercaseSequence.length(); x++){ convertedSequence += String.valueOf(convert(uppercaseSequence.charAt(x))); } return convertedSequence...
java
public String convert(ProteinSequence sequence){ String convertedSequence = ""; String uppercaseSequence = sequence.getSequenceAsString().toUpperCase(); for(int x = 0; x < uppercaseSequence.length(); x++){ convertedSequence += String.valueOf(convert(uppercaseSequence.charAt(x))); } return convertedSequence...
[ "public", "String", "convert", "(", "ProteinSequence", "sequence", ")", "{", "String", "convertedSequence", "=", "\"\"", ";", "String", "uppercaseSequence", "=", "sequence", ".", "getSequenceAsString", "(", ")", ".", "toUpperCase", "(", ")", ";", "for", "(", "...
Returns the converted sequence. The sequence argument must be a protein sequence consisting of preferably non-ambiguous characters only. Standard amino acids will be converted to '1', '2' or '3' depending on its grouping Non-standard amino acids are simply converted to '0'. @param sequence a protein sequence consistin...
[ "Returns", "the", "converted", "sequence", ".", "The", "sequence", "argument", "must", "be", "a", "protein", "sequence", "consisting", "of", "preferably", "non", "-", "ambiguous", "characters", "only", ".", "Standard", "amino", "acids", "will", "be", "converted"...
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/profeat/convertor/Convertor.java#L80-L87
31,970
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/SeqRes2AtomAligner.java
SeqRes2AtomAligner.mapSeqresRecords
public void mapSeqresRecords(Chain atomRes, Chain seqRes) { List<Group> seqResGroups = seqRes.getAtomGroups(); List<Group> atmResGroups = atomRes.getAtomGroups(); logger.debug("Comparing ATOM {} ({} groups) to SEQRES {} ({} groups) ", atomRes.getId(), atmResGroups.size(), seqRes.getId(), seqResGroups.size(...
java
public void mapSeqresRecords(Chain atomRes, Chain seqRes) { List<Group> seqResGroups = seqRes.getAtomGroups(); List<Group> atmResGroups = atomRes.getAtomGroups(); logger.debug("Comparing ATOM {} ({} groups) to SEQRES {} ({} groups) ", atomRes.getId(), atmResGroups.size(), seqRes.getId(), seqResGroups.size(...
[ "public", "void", "mapSeqresRecords", "(", "Chain", "atomRes", ",", "Chain", "seqRes", ")", "{", "List", "<", "Group", ">", "seqResGroups", "=", "seqRes", ".", "getAtomGroups", "(", ")", ";", "List", "<", "Group", ">", "atmResGroups", "=", "atomRes", ".", ...
Map the seqRes groups to the atomRes chain. Updates the atomRes chain object with the mapped data The seqRes chain should not be needed after this and atomRes should be further used. @param atomRes the chain containing ATOM groups (in atomGroups slot). This chain is modified to contain in its seqresGroups slot the map...
[ "Map", "the", "seqRes", "groups", "to", "the", "atomRes", "chain", ".", "Updates", "the", "atomRes", "chain", "object", "with", "the", "mapped", "data", "The", "seqRes", "chain", "should", "not", "be", "needed", "after", "this", "and", "atomRes", "should", ...
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/SeqRes2AtomAligner.java#L162-L214
31,971
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/SeqRes2AtomAligner.java
SeqRes2AtomAligner.getFullAtomSequence
public static String getFullAtomSequence(List<Group> groups, Map<Integer, Integer> positionIndex, boolean isNucleotideChain){ StringBuffer sequence = new StringBuffer() ; int seqIndex = 0; // track sequence.length() for ( int i=0 ; i< groups.size(); i++){ Group g = groups.get(i); if ( g instanceof AminoAc...
java
public static String getFullAtomSequence(List<Group> groups, Map<Integer, Integer> positionIndex, boolean isNucleotideChain){ StringBuffer sequence = new StringBuffer() ; int seqIndex = 0; // track sequence.length() for ( int i=0 ; i< groups.size(); i++){ Group g = groups.get(i); if ( g instanceof AminoAc...
[ "public", "static", "String", "getFullAtomSequence", "(", "List", "<", "Group", ">", "groups", ",", "Map", "<", "Integer", ",", "Integer", ">", "positionIndex", ",", "boolean", "isNucleotideChain", ")", "{", "StringBuffer", "sequence", "=", "new", "StringBuffer"...
Returns the full sequence of the Atom records of a parent with X instead of HETATMSs. The advantage of this is that it allows us to also align HETATM groups back to the SEQRES. @param groups the list of groups in a parent @param positionIndex a Map to keep track of which group is at which sequence position @param isNuc...
[ "Returns", "the", "full", "sequence", "of", "the", "Atom", "records", "of", "a", "parent", "with", "X", "instead", "of", "HETATMSs", ".", "The", "advantage", "of", "this", "is", "that", "it", "allows", "us", "to", "also", "align", "HETATM", "groups", "ba...
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/SeqRes2AtomAligner.java#L368-L451
31,972
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/SeqRes2AtomAligner.java
SeqRes2AtomAligner.storeUnAlignedSeqRes
public static void storeUnAlignedSeqRes(Structure structure, List<Chain> seqResChains, boolean headerOnly) { if (headerOnly) { List<Chain> atomChains = new ArrayList<>(); for (Chain seqRes: seqResChains) { // In header-only mode skip ATOM records. // Here we store chains with SEQRES instead of AtomGr...
java
public static void storeUnAlignedSeqRes(Structure structure, List<Chain> seqResChains, boolean headerOnly) { if (headerOnly) { List<Chain> atomChains = new ArrayList<>(); for (Chain seqRes: seqResChains) { // In header-only mode skip ATOM records. // Here we store chains with SEQRES instead of AtomGr...
[ "public", "static", "void", "storeUnAlignedSeqRes", "(", "Structure", "structure", ",", "List", "<", "Chain", ">", "seqResChains", ",", "boolean", "headerOnly", ")", "{", "if", "(", "headerOnly", ")", "{", "List", "<", "Chain", ">", "atomChains", "=", "new",...
Storing unaligned SEQRES groups in a Structure. @param structure @param seqResChains
[ "Storing", "unaligned", "SEQRES", "groups", "in", "a", "Structure", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/SeqRes2AtomAligner.java#L820-L858
31,973
biojava/biojava
biojava-structure-gui/src/main/java/org/biojava/nbio/structure/align/gui/jmol/AbstractAlignmentJmol.java
AbstractAlignmentJmol.setAtoms
public void setAtoms(Atom[] atoms){ Structure s = new StructureImpl(); Chain c = new ChainImpl(); c.setId("A"); for (Atom a: atoms){ c.addGroup(a.getGroup()); } s.addChain(c); setStructure(s); }
java
public void setAtoms(Atom[] atoms){ Structure s = new StructureImpl(); Chain c = new ChainImpl(); c.setId("A"); for (Atom a: atoms){ c.addGroup(a.getGroup()); } s.addChain(c); setStructure(s); }
[ "public", "void", "setAtoms", "(", "Atom", "[", "]", "atoms", ")", "{", "Structure", "s", "=", "new", "StructureImpl", "(", ")", ";", "Chain", "c", "=", "new", "ChainImpl", "(", ")", ";", "c", ".", "setId", "(", "\"A\"", ")", ";", "for", "(", "At...
Create and set a new structure from a given atom array. @param atoms
[ "Create", "and", "set", "a", "new", "structure", "from", "a", "given", "atom", "array", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure-gui/src/main/java/org/biojava/nbio/structure/align/gui/jmol/AbstractAlignmentJmol.java#L103-L112
31,974
biojava/biojava
biojava-structure-gui/src/main/java/org/biojava/nbio/structure/align/gui/jmol/AbstractAlignmentJmol.java
AbstractAlignmentJmol.evalString
public void evalString(String rasmolScript){ if ( jmolPanel == null ){ logger.error("please install Jmol first"); return; } jmolPanel.evalString(rasmolScript); }
java
public void evalString(String rasmolScript){ if ( jmolPanel == null ){ logger.error("please install Jmol first"); return; } jmolPanel.evalString(rasmolScript); }
[ "public", "void", "evalString", "(", "String", "rasmolScript", ")", "{", "if", "(", "jmolPanel", "==", "null", ")", "{", "logger", ".", "error", "(", "\"please install Jmol first\"", ")", ";", "return", ";", "}", "jmolPanel", ".", "evalString", "(", "rasmolS...
Execute a command String in the current Jmol panel. @param rasmolScript
[ "Execute", "a", "command", "String", "in", "the", "current", "Jmol", "panel", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure-gui/src/main/java/org/biojava/nbio/structure/align/gui/jmol/AbstractAlignmentJmol.java#L140-L146
31,975
biojava/biojava
biojava-structure-gui/src/main/java/org/biojava/nbio/structure/align/gui/jmol/AbstractAlignmentJmol.java
AbstractAlignmentJmol.setStructure
public void setStructure(Structure s) { if (jmolPanel == null){ logger.error("please install Jmol first"); return; } setTitle(s.getPDBCode()); jmolPanel.setStructure(s); // actually this is very simple // just convert the structure to a PDB file //String pdb = s.toPDB(); //System.out.println(s....
java
public void setStructure(Structure s) { if (jmolPanel == null){ logger.error("please install Jmol first"); return; } setTitle(s.getPDBCode()); jmolPanel.setStructure(s); // actually this is very simple // just convert the structure to a PDB file //String pdb = s.toPDB(); //System.out.println(s....
[ "public", "void", "setStructure", "(", "Structure", "s", ")", "{", "if", "(", "jmolPanel", "==", "null", ")", "{", "logger", ".", "error", "(", "\"please install Jmol first\"", ")", ";", "return", ";", "}", "setTitle", "(", "s", ".", "getPDBCode", "(", "...
Set a new Structure to visualize in the AlignmentJmol window. @param s
[ "Set", "a", "new", "Structure", "to", "visualize", "in", "the", "AlignmentJmol", "window", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure-gui/src/main/java/org/biojava/nbio/structure/align/gui/jmol/AbstractAlignmentJmol.java#L152-L181
31,976
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/contact/StructureInterfaceCluster.java
StructureInterfaceCluster.getTotalArea
public double getTotalArea() { double area = 0; for (StructureInterface interf:members) { area+=interf.getTotalArea(); } return area/members.size(); }
java
public double getTotalArea() { double area = 0; for (StructureInterface interf:members) { area+=interf.getTotalArea(); } return area/members.size(); }
[ "public", "double", "getTotalArea", "(", ")", "{", "double", "area", "=", "0", ";", "for", "(", "StructureInterface", "interf", ":", "members", ")", "{", "area", "+=", "interf", ".", "getTotalArea", "(", ")", ";", "}", "return", "area", "/", "members", ...
Return the average buried surface area for this interface cluster @return
[ "Return", "the", "average", "buried", "surface", "area", "for", "this", "interface", "cluster" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/contact/StructureInterfaceCluster.java#L70-L76
31,977
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java
MmtfUtils.calculateDsspSecondaryStructure
public static void calculateDsspSecondaryStructure(Structure bioJavaStruct) { SecStrucCalc ssp = new SecStrucCalc(); try{ ssp.calculate(bioJavaStruct, true); } catch(StructureException e) { LOGGER.warn("Could not calculate secondary structure (error {}). Will try to get a DSSP file from the RCSB web serv...
java
public static void calculateDsspSecondaryStructure(Structure bioJavaStruct) { SecStrucCalc ssp = new SecStrucCalc(); try{ ssp.calculate(bioJavaStruct, true); } catch(StructureException e) { LOGGER.warn("Could not calculate secondary structure (error {}). Will try to get a DSSP file from the RCSB web serv...
[ "public", "static", "void", "calculateDsspSecondaryStructure", "(", "Structure", "bioJavaStruct", ")", "{", "SecStrucCalc", "ssp", "=", "new", "SecStrucCalc", "(", ")", ";", "try", "{", "ssp", ".", "calculate", "(", "bioJavaStruct", ",", "true", ")", ";", "}",...
Generate the secondary structure for a Biojava structure object. @param bioJavaStruct the Biojava structure for which it is to be calculate.
[ "Generate", "the", "secondary", "structure", "for", "a", "Biojava", "structure", "object", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java#L159-L174
31,978
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java
MmtfUtils.getUnitCellAsArray
public static float[] getUnitCellAsArray(PDBCrystallographicInfo xtalInfo) { CrystalCell xtalCell = xtalInfo.getCrystalCell(); if(xtalCell==null){ return null; }else{ float[] inputUnitCell = new float[6]; inputUnitCell[0] = (float) xtalCell.getA(); inputUnitCell[1] = (float) xtalCell.getB(); inputU...
java
public static float[] getUnitCellAsArray(PDBCrystallographicInfo xtalInfo) { CrystalCell xtalCell = xtalInfo.getCrystalCell(); if(xtalCell==null){ return null; }else{ float[] inputUnitCell = new float[6]; inputUnitCell[0] = (float) xtalCell.getA(); inputUnitCell[1] = (float) xtalCell.getB(); inputU...
[ "public", "static", "float", "[", "]", "getUnitCellAsArray", "(", "PDBCrystallographicInfo", "xtalInfo", ")", "{", "CrystalCell", "xtalCell", "=", "xtalInfo", ".", "getCrystalCell", "(", ")", ";", "if", "(", "xtalCell", "==", "null", ")", "{", "return", "null"...
Get the length six array of the unit cell information. @param xtalInfo the input PDBCrystallographicInfo object @return the length six float array
[ "Get", "the", "length", "six", "array", "of", "the", "unit", "cell", "information", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java#L195-L209
31,979
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java
MmtfUtils.techniquesToStringArray
public static String[] techniquesToStringArray(Set<ExperimentalTechnique> experimentalTechniques) { if(experimentalTechniques==null){ return new String[0]; } String[] outArray = new String[experimentalTechniques.size()]; int index = 0; for (ExperimentalTechnique experimentalTechnique : experimentalTechniqu...
java
public static String[] techniquesToStringArray(Set<ExperimentalTechnique> experimentalTechniques) { if(experimentalTechniques==null){ return new String[0]; } String[] outArray = new String[experimentalTechniques.size()]; int index = 0; for (ExperimentalTechnique experimentalTechnique : experimentalTechniqu...
[ "public", "static", "String", "[", "]", "techniquesToStringArray", "(", "Set", "<", "ExperimentalTechnique", ">", "experimentalTechniques", ")", "{", "if", "(", "experimentalTechniques", "==", "null", ")", "{", "return", "new", "String", "[", "0", "]", ";", "}...
Converts the set of experimental techniques to an array of strings. @param experimentalTechniques the input set of experimental techniques @return the array of strings describing the methods used.
[ "Converts", "the", "set", "of", "experimental", "techniques", "to", "an", "array", "of", "strings", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java#L216-L227
31,980
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java
MmtfUtils.dateToIsoString
public static String dateToIsoString(Date inputDate) { DateFormat dateStringFormat = new SimpleDateFormat("yyyy-MM-dd"); return dateStringFormat.format(inputDate); }
java
public static String dateToIsoString(Date inputDate) { DateFormat dateStringFormat = new SimpleDateFormat("yyyy-MM-dd"); return dateStringFormat.format(inputDate); }
[ "public", "static", "String", "dateToIsoString", "(", "Date", "inputDate", ")", "{", "DateFormat", "dateStringFormat", "=", "new", "SimpleDateFormat", "(", "\"yyyy-MM-dd\"", ")", ";", "return", "dateStringFormat", ".", "format", "(", "inputDate", ")", ";", "}" ]
Covert a Date object to ISO time format. @param inputDate The input date object @return the time in ISO time format
[ "Covert", "a", "Date", "object", "to", "ISO", "time", "format", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java#L234-L237
31,981
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java
MmtfUtils.getTransformMap
public static Map<double[], int[]> getTransformMap(BioAssemblyInfo bioassemblyInfo, Map<String, Integer> chainIdToIndexMap) { Map<Matrix4d, List<Integer>> matMap = new LinkedHashMap<>(); List<BiologicalAssemblyTransformation> transforms = bioassemblyInfo.getTransforms(); for (BiologicalAssemblyTransformation t...
java
public static Map<double[], int[]> getTransformMap(BioAssemblyInfo bioassemblyInfo, Map<String, Integer> chainIdToIndexMap) { Map<Matrix4d, List<Integer>> matMap = new LinkedHashMap<>(); List<BiologicalAssemblyTransformation> transforms = bioassemblyInfo.getTransforms(); for (BiologicalAssemblyTransformation t...
[ "public", "static", "Map", "<", "double", "[", "]", ",", "int", "[", "]", ">", "getTransformMap", "(", "BioAssemblyInfo", "bioassemblyInfo", ",", "Map", "<", "String", ",", "Integer", ">", "chainIdToIndexMap", ")", "{", "Map", "<", "Matrix4d", ",", "List",...
Convert a bioassembly information into a map of transform, chainindices it relates to. @param bioassemblyInfo the bioassembly info object for this structure @param chainIdToIndexMap the map of chain ids to the index that chain corresponds to. @return the bioassembly information (as primitive types).
[ "Convert", "a", "bioassembly", "information", "into", "a", "map", "of", "transform", "chainindices", "it", "relates", "to", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java#L245-L270
31,982
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java
MmtfUtils.convertToDoubleArray
public static double[] convertToDoubleArray(Matrix4d transformationMatrix) { // Initialise the output array double[] outArray = new double[16]; // Iterate over the matrix for(int i=0; i<4; i++){ for(int j=0; j<4; j++){ // Now set this element outArray[i*4+j] = transformationMatrix.getElement(i,j); ...
java
public static double[] convertToDoubleArray(Matrix4d transformationMatrix) { // Initialise the output array double[] outArray = new double[16]; // Iterate over the matrix for(int i=0; i<4; i++){ for(int j=0; j<4; j++){ // Now set this element outArray[i*4+j] = transformationMatrix.getElement(i,j); ...
[ "public", "static", "double", "[", "]", "convertToDoubleArray", "(", "Matrix4d", "transformationMatrix", ")", "{", "// Initialise the output array", "double", "[", "]", "outArray", "=", "new", "double", "[", "16", "]", ";", "// Iterate over the matrix", "for", "(", ...
Convert a four-d matrix to a double array. Row-packed. @param transformationMatrix the input matrix4d object @return the double array (16 long).
[ "Convert", "a", "four", "-", "d", "matrix", "to", "a", "double", "array", ".", "Row", "-", "packed", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java#L277-L288
31,983
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java
MmtfUtils.getNumGroups
public static int getNumGroups(Structure structure) { int count = 0; for(int i=0; i<structure.nrModels(); i++) { for(Chain chain : structure.getChains(i)){ count+= chain.getAtomGroups().size(); } } return count; }
java
public static int getNumGroups(Structure structure) { int count = 0; for(int i=0; i<structure.nrModels(); i++) { for(Chain chain : structure.getChains(i)){ count+= chain.getAtomGroups().size(); } } return count; }
[ "public", "static", "int", "getNumGroups", "(", "Structure", "structure", ")", "{", "int", "count", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "structure", ".", "nrModels", "(", ")", ";", "i", "++", ")", "{", "for", "(", "Cha...
Count the total number of groups in the structure @param structure the input structure @return the total number of groups
[ "Count", "the", "total", "number", "of", "groups", "in", "the", "structure" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java#L295-L303
31,984
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java
MmtfUtils.getAtomsForGroup
public static List<Atom> getAtomsForGroup(Group inputGroup) { Set<Atom> uniqueAtoms = new HashSet<Atom>(); List<Atom> theseAtoms = new ArrayList<Atom>(); for(Atom a: inputGroup.getAtoms()){ theseAtoms.add(a); uniqueAtoms.add(a); } List<Group> altLocs = inputGroup.getAltLocs(); for(Group thisG: altLocs...
java
public static List<Atom> getAtomsForGroup(Group inputGroup) { Set<Atom> uniqueAtoms = new HashSet<Atom>(); List<Atom> theseAtoms = new ArrayList<Atom>(); for(Atom a: inputGroup.getAtoms()){ theseAtoms.add(a); uniqueAtoms.add(a); } List<Group> altLocs = inputGroup.getAltLocs(); for(Group thisG: altLocs...
[ "public", "static", "List", "<", "Atom", ">", "getAtomsForGroup", "(", "Group", "inputGroup", ")", "{", "Set", "<", "Atom", ">", "uniqueAtoms", "=", "new", "HashSet", "<", "Atom", ">", "(", ")", ";", "List", "<", "Atom", ">", "theseAtoms", "=", "new", ...
Get a list of atoms for a group. Only add each atom once. @param inputGroup the Biojava Group to consider @return the atoms for the input Biojava Group
[ "Get", "a", "list", "of", "atoms", "for", "a", "group", ".", "Only", "add", "each", "atom", "once", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java#L311-L328
31,985
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java
MmtfUtils.getNumBondsInGroup
public static int getNumBondsInGroup(List<Atom> atomsInGroup) { int bondCounter = 0; for(Atom atom : atomsInGroup) { if(atom.getBonds()==null){ continue; } for(Bond bond : atom.getBonds()) { // Now set the bonding information. Atom other = bond.getOther(atom); // If both atoms are in the gr...
java
public static int getNumBondsInGroup(List<Atom> atomsInGroup) { int bondCounter = 0; for(Atom atom : atomsInGroup) { if(atom.getBonds()==null){ continue; } for(Bond bond : atom.getBonds()) { // Now set the bonding information. Atom other = bond.getOther(atom); // If both atoms are in the gr...
[ "public", "static", "int", "getNumBondsInGroup", "(", "List", "<", "Atom", ">", "atomsInGroup", ")", "{", "int", "bondCounter", "=", "0", ";", "for", "(", "Atom", "atom", ":", "atomsInGroup", ")", "{", "if", "(", "atom", ".", "getBonds", "(", ")", "=="...
Find the number of bonds in a group @param atomsInGroup the list of atoms in the group @return the number of atoms in the group
[ "Find", "the", "number", "of", "bonds", "in", "a", "group" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java#L335-L356
31,986
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java
MmtfUtils.getSecStructTypeFromDsspIndex
public static SecStrucType getSecStructTypeFromDsspIndex(int dsspIndex) { String dsspType = DsspType.dsspTypeFromInt(dsspIndex).getDsspType(); for(SecStrucType secStrucType : SecStrucType.values()) { if(dsspType==secStrucType.name) { return secStrucType; } } // Return a null entry. return null;...
java
public static SecStrucType getSecStructTypeFromDsspIndex(int dsspIndex) { String dsspType = DsspType.dsspTypeFromInt(dsspIndex).getDsspType(); for(SecStrucType secStrucType : SecStrucType.values()) { if(dsspType==secStrucType.name) { return secStrucType; } } // Return a null entry. return null;...
[ "public", "static", "SecStrucType", "getSecStructTypeFromDsspIndex", "(", "int", "dsspIndex", ")", "{", "String", "dsspType", "=", "DsspType", ".", "dsspTypeFromInt", "(", "dsspIndex", ")", ".", "getDsspType", "(", ")", ";", "for", "(", "SecStrucType", "secStrucTy...
Set the DSSP type based on a numerical index. @param dsspIndex the integer index of the type to set @return the instance of the SecStrucType object holding this secondary structure type.
[ "Set", "the", "DSSP", "type", "based", "on", "a", "numerical", "index", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java#L393-L404
31,987
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java
MmtfUtils.getStructureInfo
public static MmtfSummaryDataBean getStructureInfo(Structure structure) { MmtfSummaryDataBean mmtfSummaryDataBean = new MmtfSummaryDataBean(); // Get all the atoms List<Atom> theseAtoms = new ArrayList<>(); List<Chain> allChains = new ArrayList<>(); Map<String, Integer> chainIdToIndexMap = new LinkedHashMap<>...
java
public static MmtfSummaryDataBean getStructureInfo(Structure structure) { MmtfSummaryDataBean mmtfSummaryDataBean = new MmtfSummaryDataBean(); // Get all the atoms List<Atom> theseAtoms = new ArrayList<>(); List<Chain> allChains = new ArrayList<>(); Map<String, Integer> chainIdToIndexMap = new LinkedHashMap<>...
[ "public", "static", "MmtfSummaryDataBean", "getStructureInfo", "(", "Structure", "structure", ")", "{", "MmtfSummaryDataBean", "mmtfSummaryDataBean", "=", "new", "MmtfSummaryDataBean", "(", ")", ";", "// Get all the atoms", "List", "<", "Atom", ">", "theseAtoms", "=", ...
Get summary information for the structure. @param structure the structure for which to get the information.
[ "Get", "summary", "information", "for", "the", "structure", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java#L410-L445
31,988
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java
MmtfUtils.insertSeqResGroup
public static void insertSeqResGroup(Chain chain, Group group, int sequenceIndexId) { List<Group> seqResGroups = chain.getSeqResGroups(); addGroupAtId(seqResGroups, group, sequenceIndexId); }
java
public static void insertSeqResGroup(Chain chain, Group group, int sequenceIndexId) { List<Group> seqResGroups = chain.getSeqResGroups(); addGroupAtId(seqResGroups, group, sequenceIndexId); }
[ "public", "static", "void", "insertSeqResGroup", "(", "Chain", "chain", ",", "Group", "group", ",", "int", "sequenceIndexId", ")", "{", "List", "<", "Group", ">", "seqResGroups", "=", "chain", ".", "getSeqResGroups", "(", ")", ";", "addGroupAtId", "(", "seqR...
Insert the group in the given position in the sequence. @param chain the chain to add the seq res group to @param group the group to add @param sequenceIndexId the index to add it in
[ "Insert", "the", "group", "in", "the", "given", "position", "in", "the", "sequence", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java#L492-L495
31,989
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java
MmtfUtils.addSeqRes
public static void addSeqRes(Chain modelChain, String sequence) { List<Group> seqResGroups = modelChain.getSeqResGroups(); GroupType chainType = getChainType(modelChain.getAtomGroups()); for(int i=0; i<sequence.length(); i++){ char singleLetterCode = sequence.charAt(i); Group group = null; if(seqResGroup...
java
public static void addSeqRes(Chain modelChain, String sequence) { List<Group> seqResGroups = modelChain.getSeqResGroups(); GroupType chainType = getChainType(modelChain.getAtomGroups()); for(int i=0; i<sequence.length(); i++){ char singleLetterCode = sequence.charAt(i); Group group = null; if(seqResGroup...
[ "public", "static", "void", "addSeqRes", "(", "Chain", "modelChain", ",", "String", "sequence", ")", "{", "List", "<", "Group", ">", "seqResGroups", "=", "modelChain", ".", "getSeqResGroups", "(", ")", ";", "GroupType", "chainType", "=", "getChainType", "(", ...
Add the missing groups to the SeqResGroups. @param modelChain the chain to add the information for @param sequence the sequence of the construct
[ "Add", "the", "missing", "groups", "to", "the", "SeqResGroups", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java#L502-L520
31,990
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/GenericInsdcHeaderFormat.java
GenericInsdcHeaderFormat._write_feature
protected String _write_feature(FeatureInterface<AbstractSequence<C>, C> feature, int record_length) { String location = _insdc_feature_location_string(feature, record_length); String f_type = feature.getType().replace(" ", "_"); StringBuilder sb = new StringBuilder(); Formatter formatter = new Formatter(sb,Loc...
java
protected String _write_feature(FeatureInterface<AbstractSequence<C>, C> feature, int record_length) { String location = _insdc_feature_location_string(feature, record_length); String f_type = feature.getType().replace(" ", "_"); StringBuilder sb = new StringBuilder(); Formatter formatter = new Formatter(sb,Loc...
[ "protected", "String", "_write_feature", "(", "FeatureInterface", "<", "AbstractSequence", "<", "C", ">", ",", "C", ">", "feature", ",", "int", "record_length", ")", "{", "String", "location", "=", "_insdc_feature_location_string", "(", "feature", ",", "record_len...
Write a single SeqFeature object to features table. @param feature @param record_length
[ "Write", "a", "single", "SeqFeature", "object", "to", "features", "table", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/GenericInsdcHeaderFormat.java#L116-L146
31,991
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/GenericInsdcHeaderFormat.java
GenericInsdcHeaderFormat._split_multi_line
protected ArrayList<String> _split_multi_line(String text, int max_len) { // TODO Auto-generated method stub ArrayList<String> output = new ArrayList<String>(); text = text.trim(); if(text.length() <= max_len) { output.add(text); return output; } ArrayList<String> words = new ArrayList<String>(); C...
java
protected ArrayList<String> _split_multi_line(String text, int max_len) { // TODO Auto-generated method stub ArrayList<String> output = new ArrayList<String>(); text = text.trim(); if(text.length() <= max_len) { output.add(text); return output; } ArrayList<String> words = new ArrayList<String>(); C...
[ "protected", "ArrayList", "<", "String", ">", "_split_multi_line", "(", "String", "text", ",", "int", "max_len", ")", "{", "// TODO Auto-generated method stub", "ArrayList", "<", "String", ">", "output", "=", "new", "ArrayList", "<", "String", ">", "(", ")", "...
Returns a list of strings. Any single words which are too long get returned as a whole line (e.g. URLs) without an exception or warning. @param text @param max_len
[ "Returns", "a", "list", "of", "strings", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/GenericInsdcHeaderFormat.java#L341-L362
31,992
biojava/biojava
biojava-alignment/src/main/java/org/biojava/nbio/alignment/SimpleGapPenalty.java
SimpleGapPenalty.setType
private void setType() { type = (gop == 0) ? GapPenalty.Type.LINEAR : ((gep == 0) ? GapPenalty.Type.CONSTANT : GapPenalty.Type.AFFINE); }
java
private void setType() { type = (gop == 0) ? GapPenalty.Type.LINEAR : ((gep == 0) ? GapPenalty.Type.CONSTANT : GapPenalty.Type.AFFINE); }
[ "private", "void", "setType", "(", ")", "{", "type", "=", "(", "gop", "==", "0", ")", "?", "GapPenalty", ".", "Type", ".", "LINEAR", ":", "(", "(", "gep", "==", "0", ")", "?", "GapPenalty", ".", "Type", ".", "CONSTANT", ":", "GapPenalty", ".", "T...
helper method to set the type given the open and extension penalties
[ "helper", "method", "to", "set", "the", "type", "given", "the", "open", "and", "extension", "penalties" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-alignment/src/main/java/org/biojava/nbio/alignment/SimpleGapPenalty.java#L121-L123
31,993
biojava/biojava
biojava-modfinder/src/main/java/org/biojava/nbio/protmod/io/ProteinModificationXmlReader.java
ProteinModificationXmlReader.getChildNodes
private static Map<String,List<Node>> getChildNodes(Node parent) { if (parent==null) return Collections.emptyMap(); Map<String,List<Node>> children = new HashMap<String,List<Node>>(); NodeList nodes = parent.getChildNodes(); int nNodes = nodes.getLength(); for (int i=0; i<nNodes; i++) { Node node = no...
java
private static Map<String,List<Node>> getChildNodes(Node parent) { if (parent==null) return Collections.emptyMap(); Map<String,List<Node>> children = new HashMap<String,List<Node>>(); NodeList nodes = parent.getChildNodes(); int nNodes = nodes.getLength(); for (int i=0; i<nNodes; i++) { Node node = no...
[ "private", "static", "Map", "<", "String", ",", "List", "<", "Node", ">", ">", "getChildNodes", "(", "Node", "parent", ")", "{", "if", "(", "parent", "==", "null", ")", "return", "Collections", ".", "emptyMap", "(", ")", ";", "Map", "<", "String", ",...
Utility method to group child nodes by their names. @param parent parent node. @return Map from name to child nodes.
[ "Utility", "method", "to", "group", "child", "nodes", "by", "their", "names", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-modfinder/src/main/java/org/biojava/nbio/protmod/io/ProteinModificationXmlReader.java#L341-L364
31,994
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/transcription/RNAToAminoAcidTranslator.java
RNAToAminoAcidTranslator.postProcessCompoundLists
@Override protected void postProcessCompoundLists( List<List<AminoAcidCompound>> compoundLists) { for (List<AminoAcidCompound> compounds : compoundLists) { if (trimStops) { trimStop(compounds); } } }
java
@Override protected void postProcessCompoundLists( List<List<AminoAcidCompound>> compoundLists) { for (List<AminoAcidCompound> compounds : compoundLists) { if (trimStops) { trimStop(compounds); } } }
[ "@", "Override", "protected", "void", "postProcessCompoundLists", "(", "List", "<", "List", "<", "AminoAcidCompound", ">", ">", "compoundLists", ")", "{", "for", "(", "List", "<", "AminoAcidCompound", ">", "compounds", ":", "compoundLists", ")", "{", "if", "("...
Performs the trimming of stop codons and the conversion of a valid start amino acid to M
[ "Performs", "the", "trimming", "of", "stop", "codons", "and", "the", "conversion", "of", "a", "valid", "start", "amino", "acid", "to", "M" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/transcription/RNAToAminoAcidTranslator.java#L174-L182
31,995
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/transcription/RNAToAminoAcidTranslator.java
RNAToAminoAcidTranslator.trimStop
protected void trimStop(List<AminoAcidCompound> sequence) { AminoAcidCompound stop = sequence.get(sequence.size() - 1); boolean isStop = false; if (aminoAcidToCodon.containsKey(stop)) { for (Codon c : aminoAcidToCodon.get(stop)) { if (c.isStop()) { isStop = true; break; } } } if (isSt...
java
protected void trimStop(List<AminoAcidCompound> sequence) { AminoAcidCompound stop = sequence.get(sequence.size() - 1); boolean isStop = false; if (aminoAcidToCodon.containsKey(stop)) { for (Codon c : aminoAcidToCodon.get(stop)) { if (c.isStop()) { isStop = true; break; } } } if (isSt...
[ "protected", "void", "trimStop", "(", "List", "<", "AminoAcidCompound", ">", "sequence", ")", "{", "AminoAcidCompound", "stop", "=", "sequence", ".", "get", "(", "sequence", ".", "size", "(", ")", "-", "1", ")", ";", "boolean", "isStop", "=", "false", ";...
Imperfect code. Checks the last amino acid to see if a codon could have translated a stop for it. Left in for the moment
[ "Imperfect", "code", ".", "Checks", "the", "last", "amino", "acid", "to", "see", "if", "a", "codon", "could", "have", "translated", "a", "stop", "for", "it", ".", "Left", "in", "for", "the", "moment" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/transcription/RNAToAminoAcidTranslator.java#L188-L203
31,996
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/internal/ResidueGroup.java
ResidueGroup.combineWith
public void combineWith(List<List<Integer>> alignRes) { for (int i = 0; i < order(); i++) alignRes.get(i).add(residues.get(i)); }
java
public void combineWith(List<List<Integer>> alignRes) { for (int i = 0; i < order(); i++) alignRes.get(i).add(residues.get(i)); }
[ "public", "void", "combineWith", "(", "List", "<", "List", "<", "Integer", ">", ">", "alignRes", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "order", "(", ")", ";", "i", "++", ")", "alignRes", ".", "get", "(", "i", ")", ".", "a...
Combine the ResidueGroup with the alignment block. @param alignRes the alignment block, will be modified.
[ "Combine", "the", "ResidueGroup", "with", "the", "alignment", "block", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/internal/ResidueGroup.java#L110-L113
31,997
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/AllChemCompProvider.java
AllChemCompProvider.downloadFile
public static void downloadFile() throws IOException { initPath(); initServerName(); String localName = getLocalFileName(); String u = serverName + "/" + COMPONENTS_FILE_LOCATION; downloadFileFromRemote(new URL(u), new File(localName)); }
java
public static void downloadFile() throws IOException { initPath(); initServerName(); String localName = getLocalFileName(); String u = serverName + "/" + COMPONENTS_FILE_LOCATION; downloadFileFromRemote(new URL(u), new File(localName)); }
[ "public", "static", "void", "downloadFile", "(", ")", "throws", "IOException", "{", "initPath", "(", ")", ";", "initServerName", "(", ")", ";", "String", "localName", "=", "getLocalFileName", "(", ")", ";", "String", "u", "=", "serverName", "+", "\"/\"", "...
Downloads the components.cif.gz file from the wwPDB site.
[ "Downloads", "the", "components", ".", "cif", ".", "gz", "file", "from", "the", "wwPDB", "site", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/AllChemCompProvider.java#L119-L132
31,998
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/AllChemCompProvider.java
AllChemCompProvider.run
@Override public void run() { long timeS = System.currentTimeMillis(); initPath(); ensureFileExists(); try { loadAllChemComps(); long timeE = System.currentTimeMillis(); logger.debug("Time to init chem comp dictionary: " + (timeE - timeS) / 1000 + " sec."); } catch (IOException e) { logger....
java
@Override public void run() { long timeS = System.currentTimeMillis(); initPath(); ensureFileExists(); try { loadAllChemComps(); long timeE = System.currentTimeMillis(); logger.debug("Time to init chem comp dictionary: " + (timeE - timeS) / 1000 + " sec."); } catch (IOException e) { logger....
[ "@", "Override", "public", "void", "run", "(", ")", "{", "long", "timeS", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "initPath", "(", ")", ";", "ensureFileExists", "(", ")", ";", "try", "{", "loadAllChemComps", "(", ")", ";", "long", "time...
Do the actual loading of the dictionary in a thread.
[ "Do", "the", "actual", "loading", "of", "the", "dictionary", "in", "a", "thread", "." ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/AllChemCompProvider.java#L222-L244
31,999
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/loader/SequenceFileProxyLoader.java
SequenceFileProxyLoader.init
private boolean init() throws IOException, CompoundNotFoundException { BufferedReader br = new BufferedReader(new FileReader(file)); br.skip(sequenceStartIndex); String sequence = sequenceParser.getSequence(br, sequenceLength); setContents(sequence); br.close(); // close file to prevent too many being open ...
java
private boolean init() throws IOException, CompoundNotFoundException { BufferedReader br = new BufferedReader(new FileReader(file)); br.skip(sequenceStartIndex); String sequence = sequenceParser.getSequence(br, sequenceLength); setContents(sequence); br.close(); // close file to prevent too many being open ...
[ "private", "boolean", "init", "(", ")", "throws", "IOException", ",", "CompoundNotFoundException", "{", "BufferedReader", "br", "=", "new", "BufferedReader", "(", "new", "FileReader", "(", "file", ")", ")", ";", "br", ".", "skip", "(", "sequenceStartIndex", ")...
Load the sequence @return
[ "Load", "the", "sequence" ]
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/loader/SequenceFileProxyLoader.java#L100-L109