-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample_create.py
35 lines (30 loc) · 951 Bytes
/
sample_create.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from pydent import AqSession
from resources import resources
def main():
session = AqSession(
resources['aquarium']['login'],
resources['aquarium']['password'],
resources['aquarium']['aquarium_url']
)
primer_type = session.SampleType.find_by_name('Primer')
sample = session.Sample.new(
name="Example Primer",
project="trident-demo",
description="primer created with trident",
sample_type_id=primer_type.id,
properties={
'Overhang Sequence': 'AAAAA',
'Anneal Sequence': 'GGGGGGGG',
'T Anneal': 70
}
)
print("Name: {}\nProject: {}\nDescription: {}\nSample Type: {}\nProperties: {}".format(
sample.name,
sample.project,
sample.description,
sample.sample_type.name,
sample.properties)
)
# DO NOT SAVE THIS Sample OBJECT TO AQUARIUM
if __name__ == "__main__":
main()