Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
0570329
Added sequence file mentioned in #855
paolopavan Apr 25, 2020
e8be187
Added basic integration test to demonstrate the issue
paolopavan Apr 25, 2020
0a86883
retrieve information of circular sequence
paolopavan Apr 25, 2020
a74c015
Propagate down this bit of information
paolopavan Apr 25, 2020
4fd3fdb
Need to extract also the sequence length to correctly create two loca…
paolopavan Apr 25, 2020
d724aec
Need to propagate down also this bit of information. Since two parame…
paolopavan Apr 25, 2020
e49b69b
Implementation of exceptional complex location in case of location sp…
paolopavan Apr 25, 2020
75c29b6
Modified the exception to take in account this particular case
paolopavan Apr 25, 2020
5f4ab81
even better location management
paolopavan Apr 26, 2020
f014aef
Improved unit test
paolopavan Apr 26, 2020
c1a6b15
Fixed failing unit test for sequence lengths not compatible with inte…
paolopavan Apr 26, 2020
e98bfb7
fixed failing unit test
paolopavan Apr 26, 2020
092d9b1
Usually expected preceeds tested
paolopavan Apr 27, 2020
4ead489
deleted unneeded Exception
paolopavan Apr 27, 2020
87eeb74
assertion normalization
paolopavan Apr 27, 2020
83152ed
deleted un needed methods
paolopavan Apr 27, 2020
3703042
raw type checking fixes
paolopavan Apr 27, 2020
4a0cc44
this is not suppressing anything
paolopavan Apr 27, 2020
590b0b5
increased type checking
paolopavan Apr 27, 2020
e0e6ce4
this can be final
paolopavan Apr 27, 2020
b342b92
better management of not implemented methods
paolopavan Apr 27, 2020
d02c2d2
maybe better to delete, can be recreated eventually needed
paolopavan Apr 27, 2020
496ecdc
never thrown exception
paolopavan Apr 27, 2020
6307f77
unused
paolopavan Apr 27, 2020
c6d1475
static is better, wastes less memory
paolopavan Apr 27, 2020
f013645
Those are not used
paolopavan Apr 27, 2020
23a0235
If read, a section exists. This is redundant
paolopavan Apr 27, 2020
e763320
equals method must check the class of the object.
paolopavan Apr 27, 2020
97332ca
This is a bug
paolopavan Apr 27, 2020
869af59
deleted redundant stuff
paolopavan Apr 27, 2020
5cedab4
Refactored this, no need explicit cast if DBReferenceInfo is needed
paolopavan Apr 27, 2020
d02ed45
used more appropriate property comment
paolopavan Apr 27, 2020
0809c3f
reduced complexity of this monster
paolopavan Apr 27, 2020
56138e5
deleted un needed
paolopavan Apr 27, 2020
9bb6610
better log management
paolopavan Apr 27, 2020
545c18d
replaced obsolete StringBuffer with StringBuilder. It is much faster.
paolopavan Apr 27, 2020
a22ed41
formatting
paolopavan Apr 27, 2020
7070bc6
combined exceptions
paolopavan Apr 27, 2020
dd585c9
using interfaces instead of implementations
paolopavan Apr 27, 2020
b0ac102
again, substituted implementation with interface
paolopavan Apr 27, 2020
fc63527
deep substitution of implementations with interfaces
paolopavan Apr 28, 2020
df60961
deleted commented out old code
paolopavan Apr 30, 2020
8040e39
Fixed impact of refactoring on genome module
paolopavan Apr 30, 2020
b6fe385
added type checking
paolopavan May 1, 2020
caaba86
this cast is legal
paolopavan May 1, 2020
5b21332
better typing fix
paolopavan May 1, 2020
e7407f9
better typing fix
paolopavan May 1, 2020
052791b
wasn't aware of this and no other...
paolopavan May 4, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
* If a SequenceProxyReader implements this interface then that external source
Expand All @@ -32,5 +34,5 @@
*/
public interface DatabaseReferenceInterface {

public LinkedHashMap<String,ArrayList<DBReferenceInfo>> getDatabaseReferences();
public Map<String, List<DBReferenceInfo>> getDatabaseReferences();
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@

package org.biojava.nbio.core.sequence.features;

import java.util.ArrayList;
import java.util.HashMap;
import org.biojava.nbio.core.sequence.template.AbstractSequence;
import org.biojava.nbio.core.sequence.template.Compound;

import java.util.List;
import java.util.Map;

/**
* If a SequenceProxyReader implements this interface then that external source
* has a list features
* @author @author Paolo Pavan
*/
public interface FeatureRetriever {
HashMap<String, ArrayList<AbstractFeature>> getFeatures();
public interface FeatureRetriever<C extends Compound> {
Map<String, List<AbstractFeature<AbstractSequence<C>, C>>> getFeatures();
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

package org.biojava.nbio.core.sequence.features;

import java.util.ArrayList;
import java.util.List;

/**
* Models the keywords that are annotated for a protein sequence at Uniprot. If a ProxySequenceReader
Expand All @@ -36,5 +36,5 @@ public interface FeaturesKeyWordInterface {
*
* @return
*/
public ArrayList<String> getKeyWords() ;
public List<String> getKeyWords() ;
}
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ public LinkedHashMap<String,S> process(final int max) throws IOException, Compou
}

LinkedHashMap<String,S> sequences = new LinkedHashMap<>();
@SuppressWarnings("unchecked")
int i=0;
while(true) {
if(max>0 && i>=max) break;
Expand All @@ -171,7 +170,7 @@ public LinkedHashMap<String,S> process(final int max) throws IOException, Compou
.forEach(sequence::addFeature);

// add taxonomy ID to new sequence
ArrayList<DBReferenceInfo> dbQualifier = genbankParser.getDatabaseReferences().get("db_xref");
List<DBReferenceInfo> dbQualifier = genbankParser.getDatabaseReferences().get("db_xref");
if (dbQualifier != null){
DBReferenceInfo q = dbQualifier.get(0);
sequence.setTaxonomy(new TaxonomyID(q.getDatabase()+":"+q.getId(), DataSource.GENBANK));
Expand Down
Loading