Exemple #1
0
                   'Description of an organism')

#Can't be half full
#covid10 = Organism(None, 'AGUHSHDS', 'Description')
"""Create organism from file FASTA"""

# 1) Create an empty Organism
covid2 = Organism()

# 2) Use createByFasta
covid2.createByFASTA('./samples/sequence2.fasta')
# The path is relative to the directory in which it is run
# the program or can be an absolute path

# 3) Ready for instructions
covid2.printOrganism()
"""Export an organism to FASTA file"""
covid2.exportToFASTA()
"""Create organism from file JSON"""

# 1) Create an empty Organism
covid3 = Organism()

# 2) Use createByJSON
covid3.createByJSON('./samples/sequence1.json', 'organism', 'nc', 'sequence',
                    'description')
# We need the name of the collection, the name
# of the NC attribute, the name of the sequence attribute and
# the name of the description attribute in the json file.

# 3) Ready for instructions