use of ubic.gemma.core.loader.protein.biomart.BiomartEnsemblNcbiObjectGenerator in project Gemma by PavlidisLab.
the class StringBiomartProteinConverterTest method setUp.
@Before
public void setUp() {
String fileNameBiomartmouse = "/data/loader/protein/biomart/biomartmmusculusShort.txt";
URL fileNameBiomartmouseURL = this.getClass().getResource(fileNameBiomartmouse);
File taxonBiomartFile = new File(fileNameBiomartmouseURL.getFile());
Taxon taxon = Taxon.Factory.newInstance();
taxon.setIsGenesUsable(true);
taxon.setNcbiId(10090);
taxon.setScientificName("Mus musculus");
taxon.setIsSpecies(true);
taxa.add(taxon);
try {
BiomartEnsemblNcbiObjectGenerator biomartEnsemblNcbiObjectGenerator = new BiomartEnsemblNcbiObjectGenerator();
biomartEnsemblNcbiObjectGenerator.setBioMartFileName(taxonBiomartFile);
Map<String, Ensembl2NcbiValueObject> map = biomartEnsemblNcbiObjectGenerator.generate(taxa);
stringBiomartProteinConverter = new StringProteinProteinInteractionConverter(map);
} catch (Exception e) {
e.printStackTrace();
fail();
}
stringProteinProteinInteractionOne = new StringProteinProteinInteraction("ENSMUSP00000111623", "ENSMUSP00000100396");
StringProteinProteinInteraction stringProteinProteinInteractionTwo = new StringProteinProteinInteraction("ENSMUSP00000100395", "ENSMUSP00000100396");
StringProteinProteinInteraction stringProteinProteinInteractionThree = new StringProteinProteinInteraction("ENSMUSP00000100407", "ENSMUSP00000100395");
// add them to array
stringProteinProteinInteractions.add(stringProteinProteinInteractionOne);
stringProteinProteinInteractions.add(stringProteinProteinInteractionTwo);
stringProteinProteinInteractions.add(stringProteinProteinInteractionThree);
}
use of ubic.gemma.core.loader.protein.biomart.BiomartEnsemblNcbiObjectGenerator in project Gemma by PavlidisLab.
the class StringProteinInteractionLoader method getIdMappings.
/**
* @param ensembl2entrezMappingFile mapping file
* @param taxa taxa
* @return map between Ensembl peptide IDs and NCBI gene ids understood by Gemma.
* @throws IOException io problems
*/
private Map<String, Ensembl2NcbiValueObject> getIdMappings(File ensembl2entrezMappingFile, Collection<Taxon> taxa) throws IOException {
// retrieve a map of biomart objects keyed on ensembl peptide id to use as map between entrez gene ids and
// ensemble ids
BiomartEnsemblNcbiObjectGenerator biomartEnsemblNcbiObjectGenerator = new BiomartEnsemblNcbiObjectGenerator();
biomartEnsemblNcbiObjectGenerator.setBioMartFileName(ensembl2entrezMappingFile);
return biomartEnsemblNcbiObjectGenerator.generate(taxa);
}
Aggregations