skip to main content
Roche logo
# Create the project
create project /data/ampProjects/MID_CLI_Example \
    -name MID_CLI_Example \
    -annotation ""
 
# Load the references from a tab-delimited file 
# containing data lines for each reference 
# following  the format of the header below 
# (which should be included at the top of the file):
#
# "Name"     "Annotation"     "Sequence"
#
# For this example, ref1-ref6 should be defined.
 
create reference -file referencesFile.txt
 
# Load the amplicons from a tab-delimited file 
# containing data lines for each amplicon 
# following  the format of the header below 
# (which should be included at the top of the file):
#
# "Name"     "Annotation"     "Reference"     "Primer1"     "Primer2"     "Start"     "End"
#
# For this example, amp1-amp6 should be defined 
# (where amp1 is from ref1, amp2 is from ref2, etc.).
 
create amplicon -file ampliconsFile.txt
 
# For this example, the following samples need to be created.
 
create sample -file - << HERE_TERMINATOR
"Name"
"A001"
"B_1_and_1"
"B_1_and_2"
"B_1_and_3"
"B_1_and_4"
"B_2_and_1"
"B_2_and_2"
"B_2_and_3"
"B_2_and_4"
"B_3_and_1"
"B_3_and_2"
"B_3_and_3"
"B_3_and_4"
"B_4_and_1"
"B_4_and_2"
"B_4_and_3"
"B_4_and_4"
"E_5_or_5"
"E_6_or_6"
"E_7_or_8"
"E_8_or_7"
"P1_9"
"P1_10"
"P1_11"
"P2_12"
"P2_13"
"P2_14"
HERE_TERMINATOR
 
# Create a readGroup for the readData.
create readGroup -name "96Plex_Both_Data"     
 
 
# Load the readData from a tab-delimited file 
# containing data lines for each readData set 
# following  the format of the header below 
# (which should be included at the top of the file):
#
# "SffDir"     "SffName"     "ReadGroup"     "SymLink"     "Name"
#
# For this example, two sff files named 
# ESS716O01 and ESS716O02 are being loaded.
 
load -file readDataFile.txt
 
# Use the utility execute command to run the 
# default script that loads a project with 
# the 454Standard group of 14 MIDs.
 
utility execute %libDir/create454StandardMIDs.ava
 
# For the sake of demonstrating functionality, 
# this example assumes that you want to replace 
# Mid9-Mid14 from the 454Standard group with 
# your own custom set of 6 new MIDs. 
 
# To simplify project, optionally remove the
# the 454Standard MIDs that are being replaced.
# Note: specifying the OfMidGroup option isn't
# technically necessary as the MID Names are unique
# in the project.
 
remove mid -file - << HERE_TERMINATOR
"Name"      "OfMidGroup"
"Mid9"      "454Standard"
"Mid10"     "454Standard"
"Mid11"     "454Standard"
"Mid12"     "454Standard"
"Mid13"     "454Standard"
"Mid14"     "454Standard"
HERE_TERMINATOR
 
# Create a midGroup for the new MIDs.
 
create midGroup -name "CustomMids"     
 
# Load the custom MID sequences from a tab-delimited file 
# containing data lines for each MID
# following  the format of the header below 
# (which should be included at the top of the file):
#
# "Name"     "Annotation"     "Sequence"     "MidGroup"
#
# For this example, 6 MIDs are being defined 
# with the names CMid9-CMid14.
 
create mid -file customMidFile.txt
 
# Create the four different multiplexers
# being used in the project.
 
create multiplexer -file - << HERE_TERMINATOR
"Name"     "Annotation"     "Encoding"
"MultiplexerBoth"     ""     "both"
"MultiplexerEither"   ""     "either"
"MultiplexerP1"       ""     "primer1"
"MultiplexerP2"       ""     "primer2"
HERE_TERMINATOR
 
# Set up the association of MIDs to samples 
# in each of the multiplexers.
# Note: specifying the OfPrimer1MidGroup and OfPrimer2MidGroup
# options isn't technically necessary as the MID Names are unique
# in the project.
 
assoc -file - << HERE_TERMINATOR
"Multiplexer"  "Primer1Mid"  "OfPrimer1MidGroup"  "Primer2Mid"  "OfPrimer2MidGroup"  "Sample"
"MultiplexerBoth"  "Mid1"  "454Standard"  "Mid1"  "454Standard"  "B_1_and_1"
"MultiplexerBoth"  "Mid1"  "454Standard"  "Mid2"  "454Standard"  "B_1_and_2"
"MultiplexerBoth"  "Mid1"  "454Standard"  "Mid3"  "454Standard"  "B_1_and_3"
"MultiplexerBoth"  "Mid1"  "454Standard"  "Mid4"  "454Standard"  "B_1_and_4"
"MultiplexerBoth"  "Mid2"  "454Standard"  "Mid1"  "454Standard"  "B_2_and_1"
"MultiplexerBoth"  "Mid2"  "454Standard"  "Mid2"  "454Standard"  "B_2_and_2"
"MultiplexerBoth"  "Mid2"  "454Standard"  "Mid3"  "454Standard"  "B_2_and_3"
"MultiplexerBoth"  "Mid2"  "454Standard"  "Mid4"  "454Standard"  "B_2_and_4"
"MultiplexerBoth"  "Mid3"  "454Standard"  "Mid1"  "454Standard"  "B_3_and_1"
"MultiplexerBoth"  "Mid3"  "454Standard"  "Mid2"  "454Standard"  "B_3_and_2"
"MultiplexerBoth"  "Mid3"  "454Standard"  "Mid3"  "454Standard"  "B_3_and_3"
"MultiplexerBoth"  "Mid3"  "454Standard"  "Mid4"  "454Standard"  "B_3_and_4"
"MultiplexerBoth"  "Mid4"  "454Standard"  "Mid1"  "454Standard"  "B_4_and_1"
"MultiplexerBoth"  "Mid4"  "454Standard"  "Mid2"  "454Standard"  "B_4_and_2"
"MultiplexerBoth"  "Mid4"  "454Standard"  "Mid3"  "454Standard"  "B_4_and_3"
"MultiplexerBoth"    "Mid4"  "454Standard"  "Mid4"  "454Standard"  "B_4_and_4"
"MultiplexerEither"  "Mid5"  "454Standard"  "Mid5"  "454Standard"  "E_5_or_5"
"MultiplexerEither"  "Mid6"  "454Standard"  "Mid6"  "454Standard"  "E_6_or_6"
"MultiplexerEither"  "Mid7"  "454Standard"  "Mid8"  "454Standard"  "E_7_or_8"
"MultiplexerEither"  "Mid8"  "454Standard"  "Mid7"  "454Standard"  "E_8_or_7"
"MultiplexerP1"      "CMid9"  "CustomMids"  ""  ""  "P1_9"
"MultiplexerP1"      "CMid10"  "CustomMids"  ""  ""  "P1_10"
"MultiplexerP1"      "CMid11"  "CustomMids"  ""  ""  "P1_11"
"MultiplexerP2"      ""  ""  "CMid12"  "CustomMids"  "P2_12"
"MultiplexerP2"      ""  ""  "CMid13"  "CustomMids"  "P2_13"
"MultiplexerP2"      ""  ""  "CMid14"  "CustomMids"  "P2_14"
HERE_TERMINATOR
 
# Associate the non-MID sample directly 
# with its amplicon and read data.
 
assoc -readData ESS716O02 -sample "A001" -amplicon "amp6" -ofRef "ref6"
 
# Associate the multiplexers with 
# their read data and amplicons.
 
assoc -file - << HERE_TERMINATOR
"Multiplexer"        "readData"  "amplicon"  "ofRef"
"MultiplexerBoth"    "ESS716O01"  "amp1"  "ref1"
"MultiplexerP1"      "ESS716O01"  "amp4"  "ref4"
"MultiplexerEither"  "ESS716O02"  "amp2"  "ref2"
"MultiplexerEither"  "ESS716O02"  "amp3"  "ref3"
"MultiplexerP2"      "ESS716O02"  "amp5"  "ref5"
HERE_TERMINATOR
 
save