Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3e59d75
Using the new checks for polymer type in Group, instead of similar ch…
andreasprlic Aug 11, 2016
7d39984
Merge branch 'master' of github.com:biojava/biojava
andreasprlic Aug 15, 2016
9ebfb00
working on #561
andreasprlic Aug 15, 2016
fbf294c
updating to latest version of Cobertura tests. Now can successfully r…
andreasprlic Aug 16, 2016
25a220a
excluding all demo classes from coverage tests
andreasprlic Aug 16, 2016
50ed273
Merge branch 'master' of github.com:biojava/biojava
andreasprlic Aug 16, 2016
f39825e
disabling coverage from Travis for now, until we solve the problem of…
andreasprlic Aug 16, 2016
f1d187e
Merge branch 'master' of github.com:biojava/biojava
andreasprlic Aug 17, 2016
8307f59
adding check for lPeptideLinking to isPolymeric
andreasprlic Aug 17, 2016
96d8baa
moving utility classes to detect type of Chain to the Chain interface…
andreasprlic Aug 18, 2016
814f188
Deprecating methods that got used to the Chain interface.
andreasprlic Aug 18, 2016
7817e94
making output less verbose
andreasprlic Aug 18, 2016
08ed01f
making output less verbose
andreasprlic Aug 18, 2016
285583d
making output less verbose
andreasprlic Aug 18, 2016
de35dd8
making output less verbose
andreasprlic Aug 18, 2016
1960a4b
making output less verbose
andreasprlic Aug 18, 2016
07f244a
setting default log level to warn
andreasprlic Aug 18, 2016
8ba289d
making output less verbose
andreasprlic Aug 18, 2016
0b2fe0a
making output less verbose
andreasprlic Aug 18, 2016
40b610c
trying to re-enable coverage tests now with less verbose unit test ou…
andreasprlic Aug 18, 2016
56e81e6
making output less verbose
andreasprlic Aug 18, 2016
106493d
disabling cobertura again, until we can successfully exclude MMCifFil…
andreasprlic Aug 18, 2016
2f4efd3
Merge branch 'master' of github.com:biojava/biojava
andreasprlic Aug 19, 2016
4a1dbeb
Addressing @josemduarte 's comment to change log level for method.
andreasprlic Aug 19, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ language: java
jdk:
- oraclejdk8
sudo: false

#after_success:
# - mvn clean cobertura:cobertura coveralls:report
2 changes: 1 addition & 1 deletion biojava-aa-prop/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</Console>
</appenders>
<loggers>
<root level="info">
<root level="warn">
<appender-ref ref="Console"/>
</root>
</loggers>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void testComplex() throws Exception {

PairwiseSequenceAligner<DNASequence, NucleotideCompound> aligner = Alignments.getPairwiseAligner(a, b, Alignments.PairwiseSequenceAlignerType.GLOBAL, new SimpleGapPenalty(gop, gep), mx);
SequencePair<DNASequence, NucleotideCompound> pair = aligner.getPair();
System.out.println(pair); // prints the alignment above


int nMatches = "--CGTATATATCGCGCGCGCGATATATATATCT-TCTCTAAAAAAA".length() - 2 - 4;
double expectedScore = nMatches * match
Expand Down
2 changes: 1 addition & 1 deletion biojava-alignment/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</Console>
</appenders>
<loggers>
<root level="info">
<root level="warn">
<appender-ref ref="Console"/>
</root>
</loggers>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ public void testProcess() throws Throwable {
= new GenbankProxySequenceReader<AminoAcidCompound>(System.getProperty("java.io.tmpdir"), "NP_000257", AminoAcidCompoundSet.getAminoAcidCompoundSet());
ProteinSequence proteinSequence = new ProteinSequence(genbankProteinReader);
genbankProteinReader.getHeaderParser().parseHeader(genbankProteinReader.getHeader(), proteinSequence);
logger.info("Sequence({},{}) = {}...", proteinSequence.getAccession(), proteinSequence.getLength(), proteinSequence.getSequenceAsString().substring(0, 10));
//logger.info("Sequence({},{}) = {}...", proteinSequence.getAccession(), proteinSequence.getLength(), proteinSequence.getSequenceAsString().substring(0, 10));

GenbankProxySequenceReader<NucleotideCompound> genbankDNAReader
= new GenbankProxySequenceReader<NucleotideCompound>(System.getProperty("java.io.tmpdir"), "NM_001126", DNACompoundSet.getDNACompoundSet());
DNASequence dnaSequence = new DNASequence(genbankDNAReader);
genbankDNAReader.getHeaderParser().parseHeader(genbankDNAReader.getHeader(), dnaSequence);
logger.info("Sequence({},{}) = {}...", dnaSequence.getAccession(), dnaSequence.getLength(), dnaSequence.getSequenceAsString().substring(0, 10));
//logger.info("Sequence({},{}) = {}...", dnaSequence.getAccession(), dnaSequence.getLength(), dnaSequence.getSequenceAsString().substring(0, 10));
/*
* Method 2: With the GenbankReaderHelper
*/
Expand All @@ -92,12 +92,12 @@ public void testProcess() throws Throwable {

LinkedHashMap<String, DNASequence> dnaSequences = GenbankReaderHelper.readGenbankDNASequence(dnaResource.getInputStream());
for (DNASequence sequence : dnaSequences.values()) {
logger.info("DNA Sequence: {}", sequence.getSequenceAsString());
logger.debug("DNA Sequence: {}", sequence.getSequenceAsString());
}

LinkedHashMap<String, ProteinSequence> protSequences = GenbankReaderHelper.readGenbankProteinSequence(protResource.getInputStream());
for (ProteinSequence sequence : protSequences.values()) {
logger.info("Protein Sequence: {}", sequence.getSequenceAsString());
logger.debug("Protein Sequence: {}", sequence.getSequenceAsString());
}
/*
* Method 3: With the GenbankReader Object
Expand All @@ -111,7 +111,7 @@ public void testProcess() throws Throwable {
);
dnaSequences = dnaReader.process();

logger.info("DNA Sequence: {}", dnaSequences);
logger.debug("DNA Sequence: {}", dnaSequences);


GenbankReader<ProteinSequence, AminoAcidCompound> protReader = new GenbankReader<ProteinSequence, AminoAcidCompound>(
Expand All @@ -121,7 +121,7 @@ public void testProcess() throws Throwable {
);
protSequences = protReader.process();

logger.info("Protein Sequence: {}", protSequences);
logger.debug("Protein Sequence: {}", protSequences);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void CDStest() throws Exception {


Assert.assertTrue(proteinSequences.size() == 1);
logger.info("protein sequences: {}", proteinSequences);
logger.debug("protein sequences: {}", proteinSequences);

ProteinSequence protein = new ArrayList<ProteinSequence>(proteinSequences.values()).get(0);

Expand Down
27 changes: 9 additions & 18 deletions biojava-core/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<configuration status="WARN">
<appenders>
<Console name="Console" target="SYSTEM_ERR">
<PatternLayout pattern="%d{HH:mm:ss} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<!--
<Logger name="org.biojava.nbio.core.sequence.loader.GenbankProxySequenceReader" level="debug">
<AppenderRef ref="Console"/>
</Logger>
-->
<!--
<Logger name="org.biojava.nbio.core.sequence.location.InsdcParserTest" level="debug" />
-->

<Root level="info">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
</appenders>
<loggers>
<root level="warn">
<appender-ref ref="Console"/>
</root>
</loggers>
</configuration>
23 changes: 9 additions & 14 deletions biojava-genome/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<configuration status="WARN">
<appenders>
<Console name="Console" target="SYSTEM_ERR">
<PatternLayout pattern="%d{HH:mm:ss} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<!--
<Logger name="org.biojava.nbio.core.sequence.loader.GenbankProxySequenceReader" level="debug">
<AppenderRef ref="Console"/>
</Logger>
-->
<Root level="info">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
</appenders>
<loggers>
<root level="warn">
<appender-ref ref="Console"/>
</root>
</loggers>
</configuration>
2 changes: 1 addition & 1 deletion biojava-integrationtest/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</Console>
</appenders>
<loggers>
<root level="info">
<root level="warn">
<appender-ref ref="Console"/>
</root>
</loggers>
Expand Down
23 changes: 9 additions & 14 deletions biojava-modfinder/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<configuration status="WARN">
<appenders>
<Console name="Console" target="SYSTEM_ERR">
<PatternLayout pattern="%d{HH:mm:ss} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<!--
<Logger name="org.biojava.nbio.core.sequence.loader.GenbankProxySequenceReader" level="debug">
<AppenderRef ref="Console"/>
</Logger>
-->
<Root level="info">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
</appenders>
<loggers>
<root level="warn">
<appender-ref ref="Console"/>
</root>
</loggers>
</configuration>
2 changes: 1 addition & 1 deletion biojava-ontology/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AppenderRef ref="Console"/>
</Logger>
-->
<Root level="info">
<Root level="warn">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
Expand Down
2 changes: 1 addition & 1 deletion biojava-phylo/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AppenderRef ref="Console"/>
</Logger>
-->
<Root level="info">
<Root level="warn">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
Expand Down
27 changes: 11 additions & 16 deletions biojava-protein-disorder/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_ERR">
<configuration status="WARN">
<appenders>
<console name="Console" target="SYSTEM_ERR">
<PatternLayout pattern="%d{HH:mm:ss} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<!--
<Logger name="org.biojava.nbio.core.sequence.loader.GenbankProxySequenceReader" level="debug">
<AppenderRef ref="Console"/>
</Logger>
-->
<Root level="info">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
</console>
</appenders>
<loggers>
<root level="warn">
<appender-ref ref="Console"/>
</root>
</loggers>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
public final class FastqTest
extends TestCase
{

public void testConstructor()
{
Fastq fastq = new Fastq("description", "sequence", "quality_", FastqVariant.FASTQ_SANGER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import org.biojava.nbio.core.sequence.template.Sequence;
import org.biojava.nbio.structure.io.FileParsingParameters;
import org.biojava.nbio.structure.io.mmcif.model.ChemComp;

import java.util.List;

Expand Down Expand Up @@ -277,7 +278,7 @@ public interface Chain {
/**
* Returns the sequence of amino acids as it has been provided in the ATOM records.
* Non-standard residues will be present in the string only if the property
* {@value PDBFileReader.LOAD_CHEM_COMP_PROPERTY} has been set.
* {@value org.biojava.nbio.structure.io.PDBFileReader.LOAD_CHEM_COMP_PROPERTY} has been set.
* @return amino acid sequence as string
* @see #getSeqResSequence()
*/
Expand Down Expand Up @@ -413,5 +414,53 @@ public interface Chain {
* @return
* @see EntityType
*/
EntityType getEntityType();
EntityType getEntityType();

/** Tests if a chain is consisting of water molecules only
*
* @return true if there are only solvent molecules in this chain.
*/
public boolean isWaterOnly();

/** Returns true if the given chain is composed of non-polymeric (including water) groups only.
*
* @return true if only non-polymeric groups in this chain.
*/
public boolean isPureNonPolymer();

/**
* Get the predominant {@link GroupType} for a given Chain, following these
* rules: <li>if the ratio of number of residues of a certain
* {@link GroupType} to total non-water residues is above the threshold
* {@value #org.biojava.nbio.structure.StructureTools.RATIO_RESIDUES_TO_TOTAL}, then that {@link GroupType} is
* returned</li> <li>if there is no {@link GroupType} that is above the
* threshold then the {@link GroupType} with most members is chosen, logging
* it</li>
* <p>
* See also {@link ChemComp#getPolymerType()} and
* {@link ChemComp#getResidueType()} which follow the PDB chemical component
* dictionary and provide a much more accurate description of groups and
* their linking.
* </p>
*
* @return
*/
public GroupType getPredominantGroupType();

/**
* Tell whether given chain is a protein chain
*

* @return true if protein, false if nucleotide or ligand
* @see #getPredominantGroupType()
*/
public boolean isProtein();

/**
* Tell whether given chain is DNA or RNA
*
* @return true if nucleic acid, false if protein or ligand
* @see #getPredominantGroupType()
*/
public boolean isNucleicAcid();
}
Loading