public static String getSpeciesName(InteractionImpl complex) { if (!complex.getExperiments().isEmpty()) { Experiment exp = complex.getExperiments().iterator().next(); BioSource bioSource = exp.getBioSource(); if (bioSource != null) { return bioSource.getFullName() != null ? bioSource.getFullName() : bioSource.getShortLabel(); } } return null; }
public static String getSpeciesName(InteractionImpl complex) { if (!complex.getExperiments().isEmpty()) { Experiment exp = complex.getExperiments().iterator().next(); BioSource bioSource = exp.getBioSource(); if (bioSource != null) { return bioSource.getFullName() != null ? bioSource.getFullName() : bioSource.getShortLabel(); } } return null; }
if (!protein1.getBioSource().equals( biosource2 )) { buffer.append(" Organism="); buffer.append( biosource2.getFullName() ).append( " [NCBI_TaxID=" ).append( biosource2.getTaxId() ).append( "]" ); buffer.append(';');
final String fullname = bs.getFullName(); final String taxid = bs.getTaxId(); bs.getTaxId() + "\t" + bs.getShortLabel() + "\t" + bs.getFullName() + "\t" + (tissue==null?"-":tissue.getShortLabel()) + "\t" + (cellType==null?"-":cellType.getShortLabel()) + "\t"; bs.setFullName( taxon.getScientificName() ); if( taxon.hasCommonName() ) { bs.setFullName( bs.getFullName() + " ("+ taxon.getCommonName() +")" ); bs.getFullName() + "\n" ; !StringUtils.equals( bs.getFullName(), fullname ) || !StringUtils.equals( bs.getTaxId(), taxid ) ) {
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; } }