private SimpleBioSource(BioSource bioSource) { this.label = bioSource.getShortLabel(); this.taxId = bioSource.getTaxId(); }
/** * Search a protein in the cache * * @param id * @param bioSource * * @return */ public static ProteinHolder getProtein( String id, String db, BioSource bioSource ) { String taxid = null; if ( null != bioSource ) { taxid = bioSource.getTaxId(); } // System.out.println( "Search cache using: " + buildID( id, db, taxid ) ); return (ProteinHolder) cache.get( buildID( id, db, taxid ) ); }
/** * Search a protein in the cache * * @param id * @param bioSource * * @return */ public static ProteinHolder getProtein( String id, String db, BioSource bioSource ) { String taxid = null; if ( null != bioSource ) { taxid = bioSource.getTaxId(); } // System.out.println( "Search cache using: " + buildID( id, db, taxid ) ); return (ProteinHolder) cache.get( buildID( id, db, taxid ) ); }
/** * Search a protein in the cache * * @param id * @param bioSource * * @return */ public static ProteinHolder getProtein( String id, String db, BioSource bioSource ) { String taxid = null; if ( null != bioSource ) { taxid = bioSource.getTaxId(); } // System.out.println( "Search cache using: " + buildID( id, db, taxid ) ); return (ProteinHolder) cache.get( buildID( id, db, taxid ) ); }
public static String getSpeciesTaxId(InteractionImpl complex) { if (!complex.getExperiments().isEmpty()) { Experiment exp = complex.getExperiments().iterator().next(); BioSource bioSource = exp.getBioSource(); if (bioSource != null) { return bioSource.getTaxId(); } } return null; }
public static String getSpeciesTaxId(InteractionImpl complex) { if (!complex.getExperiments().isEmpty()) { Experiment exp = complex.getExperiments().iterator().next(); BioSource bioSource = exp.getBioSource(); if (bioSource != null) { return bioSource.getTaxId(); } } return null; }
@Override public void visitBioSource(BioSource bioSource) { currentNode.setUserObject("BioSource: "+bioSource.getShortLabel()+" (taxid:"+bioSource.getTaxId()+")"); }
private static void displayFoundMessage( BioSource bioSource ) { StringBuffer sb = new StringBuffer( 128 ); sb.append( "Found BioSource by taxid " ).append( bioSource.getTaxId() ); sb.append( ". Shortlabel is " ).append( bioSource.getShortLabel() ); if ( null != bioSource.getCvCellType() ) { sb.append( ", Celltype shortlabel: " ).append( bioSource.getCvCellType().getShortLabel() ); } else { sb.append( ", No CellType" ); } if ( null != bioSource.getCvTissue() ) { sb.append( ", Tissue shortlabel: " ).append( bioSource.getCvTissue().getShortLabel() ); } else { sb.append( ", No Tissue" ); } System.out.println( sb.toString() ); }
private static void displayFoundMessage( BioSource bioSource ) { StringBuffer sb = new StringBuffer( 128 ); sb.append( "Found BioSource by taxid " ).append( bioSource.getTaxId() ); sb.append( ". Shortlabel is " ).append( bioSource.getShortLabel() ); if ( null != bioSource.getCvCellType() ) { sb.append( ", Celltype shortlabel: " ).append( bioSource.getCvCellType().getShortLabel() ); } else { sb.append( ", No CellType" ); } if ( null != bioSource.getCvTissue() ) { sb.append( ", Tissue shortlabel: " ).append( bioSource.getCvTissue().getShortLabel() ); } else { sb.append( ", No Tissue" ); } System.out.println( sb.toString() ); }
protected Key keyForBioSource(BioSource bioSource) { StringBuilder sb = new StringBuilder(256); sb.append("BioSource:").append(bioSource.getTaxId()); if (bioSource.getCvCellType() != null) { sb.append("|").append(bioSource.getCvCellType().getIdentifier()); } if (bioSource.getCvTissue() != null) { sb.append("|").append(bioSource.getCvTissue().getIdentifier()); } return new Key(sb.toString()); }
protected Key keyForBioSource(BioSource bioSource) { StringBuilder sb = new StringBuilder(256); sb.append("BioSource:").append(bioSource.getTaxId()); if (bioSource.getCvCellType() != null) { sb.append("|").append(bioSource.getCvCellType().getIdentifier()); } if (bioSource.getCvTissue() != null) { sb.append("|").append(bioSource.getCvTissue().getIdentifier()); } return new Key(sb.toString()); }
@Override public void visitBioSource(BioSource bioSource) { currentNode.setUserObject("BioSource: "+bioSource.getShortLabel()+" (taxid:"+bioSource.getTaxId()+")"); }
/** * TODO: uniqueness - taxid,celltype,tissue */ protected BioSource fetchFromDataSource(BioSource intactObject) { if (intactObject.getTaxId() == null) { throw new IllegalArgumentException("Organism without a tax id"); } // TODO: this will fail with specific celltype return getIntactContext().getDataContext().getDaoFactory() .getBioSourceDao().getByTaxonIdUnique(intactObject.getTaxId()); }
public Organism intactToMitab(BioSource organism){ if (organism != null && organism.getTaxId() != null){ Organism mitabOrganism = new OrganismImpl(); String name = organism.getShortLabel(); String fullName = organism.getFullName(); String taxId = organism.getTaxId(); if (name != null){ mitabOrganism.addIdentifier(new CrossReferenceImpl(TAXID, organism.getTaxId(), name)); } if (fullName != null){ mitabOrganism.addIdentifier(new CrossReferenceImpl(TAXID, organism.getTaxId(), fullName)); } return mitabOrganism; } return null; } }
private static void displayFoundMessage( BioSource bioSource ) { StringBuffer sb = new StringBuffer( 128 ); sb.append( "Found BioSource by taxid " ).append( bioSource.getTaxId() ); sb.append( ". Shortlabel is " ).append( bioSource.getShortLabel() ); if ( null != bioSource.getCvCellType() ) { sb.append( ", Celltype shortlabel: " ).append( bioSource.getCvCellType().getShortLabel() ); } else { sb.append( ", No CellType" ); } if ( null != bioSource.getCvTissue() ) { sb.append( ", Tissue shortlabel: " ).append( bioSource.getCvTissue().getShortLabel() ); } else { sb.append( ", No Tissue" ); } System.out.println( sb.toString() ); }
private static void printBiosource( BioSource bs, CvCellType cellType, CvTissue tissue ) { System.out.println( "Updating biosource: " + bs.getShortLabel() + "(taxid: " + bs.getTaxId() + " | CellType: " + (cellType != null ? cellType.getShortLabel() : "-") + " | Tissue: " + (tissue != null ? tissue.getShortLabel() : "-") + " | #alias: "+ bs.getAliases().size() +")" ); }
/**************************/ // is for find the ontology term for a specific interaction. Needs to take the host organism coming from experiment public OntologyTerm findOrganism(Interaction interaction) throws SolrServerException { // get BioSource information from interaction Collection<Experiment> exps = interaction.getExperiments(); if (exps.isEmpty()){ return null; } // TODO what do we do when we have several experiments? Experiment experiment = exps.iterator().next(); BioSource biosource = experiment.getBioSource(); // return an OntologyTerm using tax id and short label return biosource != null ? findOntologyTerm(biosource.getTaxId(), biosource.getShortLabel()) : null ; }
public RigDataModel buildRigDataModel(Polymer interactor) { String taxid; if (interactor.getBioSource() != null) { taxid = interactor.getBioSource().getTaxId(); } else { taxid = UNKNOWN_TAXID; } String seq = interactor.getSequence(); if (seq == null) { return null; } return new RigDataModel(seq, taxid); } }
public BioSource cloneBioSource(BioSource bioSource) throws IntactClonerException { if (bioSource == null) return null; BioSource clone = new BioSource(); clonerManager.addClone(bioSource, clone); clone.setTaxId(bioSource.getTaxId()); clone.setCvCellType(clone(bioSource.getCvCellType())); clone.setCvTissue(clone(bioSource.getCvTissue())); return clone; }
public BioSource cloneBioSource(BioSource bioSource) throws IntactClonerException { if (bioSource == null) return null; BioSource clone = new BioSource(); clonerManager.addClone(bioSource, clone); clone.setTaxId(bioSource.getTaxId()); clone.setCvCellType(clone(bioSource.getCvCellType())); clone.setCvTissue(clone(bioSource.getCvTissue())); return clone; }