Skip to content
David Johnson edited this page Feb 25, 2016 · 15 revisions

Recreate the BII-S-3 study example using ISA model class objects

First, create the investigation object and populate with content that would correspond with the INVESTIGATION section of an ISA tab file.

from isatools.model.v1 import *

# Create the root investigation object with an identifier
i = Investigation(identifier="BII-S-3")  

# Create some ontology source references
term_source_chebi = OntologySourceReference(
    name='CHEBI',
    file='http://data.bioontology.org/ontologies/CHEBI',
    version='78',
    description="Chemical Entities of Biological Interest Ontology")
term_source_efo = OntologySourceReference(
    name='EFO',
    file='http://data.bioontology.org/ontologies/EFO',
    version='111',
    description="Experimental Factor Ontology")
term_source_obi = OntologySourceReference(
    name='OBI',
    file='http://data.bioontology.org/ontologies/OBI',
    version='21',
    description="Ontology for Biomedical Investigations")
term_source_ncbitaxon = OntologySourceReference(
    name='NCBITAXON',
    file='http://data.bioontology.org/ontologies/NCBITAXON',
    version='2',
    description="National Center for Biotechnology Information (NCBI) Organismal Classification")
term_source_pato = OntologySourceReference(
    name='PATO',
    file='http://data.bioontology.org/ontologies/PATO',
    version='160',
    description="Phenotypic Quality Ontology")
# Attach ontology sources to the investigation ontology_source_references list
i.ontology_source_references.append(term_source_chebi)
i.ontology_source_references.append(term_source_efo)
i.ontology_source_references.append(term_source_obi)
i.ontology_source_references.append(term_source_ncbitaxon)
i.ontology_source_references.append(term_source_pato)

# Create two comments. The first contains an empty string, the second as some value set
comment_created_with_config = Comment(name='Created With Configuration')
comment_last_opened_with_config = Comment(name='Last Opened With Configuration')
comment_last_opened_with_config.value = "GSC MIxS human gut"
# Attach comments to the investigation comments list
i.comments.append(comment_created_with_config)
i.comments.append(comment_last_opened_with_config)

Next, let's create the study content that would typically correspond to an ISA tab file's STUDY section.

Create study object and associated metadata

s = Study(
    identifier='BII-S-3',
    title="Metagenomes and Metatranscriptomes of phytoplankton blooms from an ocean acidification mesocosm experiment",
    description="Sequencing the metatranscriptome can provide information about the response of organisms to varying environmental conditions. We present a methodology for obtaining random whole-community mRNA from a complex microbial assemblage using Pyrosequencing. The metatranscriptome had, with minimum contamination by ribosomal RNA, significant coverage of abundant transcripts, and included significantly more potentially novel proteins than in the metagenome. This experiment is part of a much larger experiment. We have produced 4 454 metatranscriptomic datasets and 6 454 metagenomic datasets. These were derived from 4 samples.",
    submission_date='15/08/2008',
    public_release_date='15/08/2008',
    filename='s_BII-S-3.txt'
)
# Add some comments that are specific for SRA format submissions to ENA
comment_sra_broker_name = Comment(name='SRA Broker Name', value='OXFORD')
comment_sra_center_name = Comment(name='SRA Center Name', value='OXFORD')
comment_sra_center_project_name = Comment(name='SRA Center Project Name', value='OXFORD')
comment_sra_lab_name = Comment(name='SRA Lab Name', value='Oxford e-Research Centre')
comment_sra_submission_action = Comment(name='SRA Submission Action', value='ADD')
s.comments.append(comment_sra_broker_name)
s.comments.append(comment_sra_center_name)
s.comments.append(comment_sra_center_project_name)
s.comments.append(comment_sra_lab_name)
s.comments.append(comment_sra_submission_action)
s.comments.append(Comment(name='Study Funding Agency'))
s.comments.append(Comment(name='Study Grant Number'))
Clone this wiki locally