skip to main content
Roche logo
# Script to create a project, compute it, and generate a report.
# Edit paths as necessary to conform to your system.
 
# Create the project architecture. Edit the path if you want to create the
# project in an alternate location.
 
create project /data/ampProjects/EGFR_CLI \
    -name EGFR_CLI \
    -annotation "CLI Example Project Creation Test"
 
# This command creates all the reference objects.
 
create reference -file - << HERE_TERMINATOR
"Name"     "Annotation"     "Sequence"
"EGFR_Exon_18"     "EGFR_Exon_18"     
"GACCCTTGTCTCTGTGTTCTTGTCCCCCCCAGCTTGTGGAGCCTCTTACACCCAGTGGAGAAGCTCCCAACCAAGCTCTCTTGAG
GATCTTGAAGGAAACTGAATTCAAAAAGATCAAAGTGCTGGGCTCCGGTGCGTTCGGCACGGTGTATAAGGTAAGGTCCCTGGCAC
AGGCCTCTGGGCTGGGCCGCAGGGCCTCTCATGGTCTGGTGGGG"
"EGFR_Exon_19"     "EGFR_Exon_19"     
"TCACAATTGCCAGTTAACGTCTTCCTTCTCTCTCTGTCATAGGGACTCTGGATCCCAGAAGGTGAGAAAGTTAAAATTCCCGTCG
CTATCAAGGAATTAAGAGAAGCAACATCTCCGAAAGCCAACAAGGAAATCCTCGATGTGAGTTTCTGCTTTGCTGTGTGGGGGTCC
ATGGCTCTGAACCTCAGGCCCACCTTTTCTC"
"EGFR_Exon_20"     "EGFR_Exon_20"     
"CCACACTGACGTGCCTCTCCCTCCCTCCAGGAAGCCTACGTGATGGCCAGCGTGGACAACCCCCACGTGTGCCGCCTGCTGGGCA
TCTGCCTCACCTCCACCGTGCAGCTCATCACGCAGCTCATGCCCTTCGGCTGCCTCCTGGACTATGTCCGGGAACACAAAGACAAT
ATTGGCTCCCAGTACCTGCTCAACTGGTGTGTGCAGATCGCAAAGGTAATCAGGGAAGGGAGATACGGGGAGGGGAGATAAGGAGC
CAGGATC"
"EGFR_Exon_21"     "EGFR_Exon_21"     
"TCTTCCCATGATGATCTGTCCCTCACAGCAGGGTCTTCTCTGTTTCAGGGCATGAACTACTTGGAGGACCGTCGCTTGGTGCACC
GCGACCTGGCAGCCAGGAACGTACTGGTGAAAACACCGCAGCATGTCAAGATCACAGATTTTGGGCTGGCCAAACTGCTGGGTGCG
GAAGAGAAAGAATACCATGCAGAAGGAGGCAAAGTAAGGAGGTGGCTTTAGGTCAGCCAGCAT"
"EGFR_Exon_22"     "EGFR_Exon_22"     
"CACTGCCTCATCTCTCACCATCCCAAGGTGCCTATCAAGTGGATGGCATTGGAATCAATTTTACACAGAATCTATACCCACCAGA
GTGATGTCTGGAGCTACGGTGAGTCATAATCCTGATGCTAATGAGTTTGTACTGAGGCCAAGCTGG"
HERE_TERMINATOR
 
# This command creates the amplicon objects.
 
create amplicon -file - << HERE_TERMINATOR
"Name"  "Annotation"  "Reference"  "Primer1"  "Primer2"  "Start"  "End"
"EGFR_18_1"  "Amplifies EGFR_Exon_18 from 23 to 66"  "EGFR_Exon_18"  
"GACCCTTGTCTCTGTGTTCTTG" "CCTCAAGAGAGCTTGGTTGG" "23" "66"
"EGFR_18_2"  "Amplifies EGFR_Exon_18 from 60 to 136"  "EGFR_Exon_18"  
"AGCCTCTTACACCCAGTGGA" "CCTTATACACCGTGCCGAAC" "60" "136"
"EGFR_18_3"  "Amplifies EGFR_Exon_18 from 123 to 197"  "EGFR_Exon_18"  
"TGAATTCAAAAAGATCAAAGTG" "CCCCACCAGACCATGAGA" "123" "197"
"EGFR_19_1"  "Amplifies EGFR_Exon_19 from 23 to 115"  "EGFR_Exon_19"  
"TCACAATTGCCAGTTAACGTCT" "GATTTCCTTGTTGGCTTTCG" "23" "115"
"EGFR_19_2"  "Amplifies EGFR_Exon_19 from 67 to 183"  "EGFR_Exon_19"  
"TCTGGATCCCAGAAGGTGAG" "GAGAAAAGGTGGGCCTGAG" "67" "183"
"EGFR_20_1"  "Amplifies EGFR_Exon_20 from 20 to 108"  "EGFR_Exon_20"  
"CCACACTGACGTGCCTCTC" "GCATGAGCTGCGTGATGAG" "20" "108"
"EGFR_20_2"  "Amplifies EGFR_Exon_20 from 102 to 194"  "EGFR_Exon_20"  
"GCATCTGCCTCACCTCCAC" "GCGATCTGCACACACCAG" "102" "194"
"EGFR_20_3"  "Amplifies EGFR_Exon_20 from 153 to 244"  "EGFR_Exon_20"  
"GGCTGCCTCCTGGACTATGT" "GATCCTGGCTCCTTATCTCC" "153" "244"
"EGFR_21_1"  "Amplifies EGFR_Exon_21 from 23 to 113"  "EGFR_Exon_21"  
"TCTTCCCATGATGATCTGTCCC" "GACATGCTGCGGTGTTTTC" "23" "113"
"EGFR_21_2"  "Amplifies EGFR_Exon_21 from 111 to 215"  "EGFR_Exon_21"  
"GGCAGCCAGGAACGTACT" "ATGCTGGCTGACCTAAAGC" "111" "215"
"EGFR_22_1"  "Amplifies EGFR_Exon_22 from 21 to 132"  "EGFR_Exon_22"  
"CACTGCCTCATCTCTCACCA" "CCAGCTTGGCCTCAGTACA" "21" "132"
HERE_TERMINATOR
 
# This command seeds the project with a few known variants.
 
create variant -file - << HERE_TERMINATOR
"Name"  "Annotation"  "Reference"  "Pattern"  "Status"
"15BP_DEL_93-107"  "Pattern entered manually"  "EGFR_Exon_19"  "d(93-107)"  "accepted"
"HAP_97C_126A"  "Created from selections"  "EGFR_Exon_18"  "s(97,C)s(126,A)"  
"accepted"
"SUB_A_to_C_97"  "Created from selections"  "EGFR_Exon_18"  "s(97,C)"  "accepted"
"SUB_G_to_A_126"  "Created from selections"  "EGFR_Exon_18"  "s(126,A)"  "accepted"
HERE_TERMINATOR
 
# This command creates all the sample objects.
 
create sample -file - << HERE_TERMINATOR
"Name"        "Annotation"
"Sample1"     "Sample1"
"Sample2"     "Sample2"
"Sample3"     "Sample3"
"Sample4"     "Sample4"
"Sample5"     "Sample5"
"Sample6"     "Sample6"
"Sample7"     "Sample7"
HERE_TERMINATOR
 
# This command sets up the Sample-Amplicon associations.
 
assoc -file - << HERE_TERMINATOR
"sample"      "amplicon"      "ofRef"
"Sample1"     "EGFR_20_1"     "EGFR_Exon_20"
"Sample1"     "EGFR_20_2"     "EGFR_Exon_20"
"Sample1"     "EGFR_20_3"     "EGFR_Exon_20"
"Sample2"     "EGFR_18_1"     "EGFR_Exon_18"
"Sample2"     "EGFR_18_2"     "EGFR_Exon_18"
"Sample2"     "EGFR_18_3"     "EGFR_Exon_18"
"Sample3"     "EGFR_18_1"     "EGFR_Exon_18"
"Sample3"     "EGFR_18_2"     "EGFR_Exon_18"
"Sample3"     "EGFR_18_3"     "EGFR_Exon_18"
"Sample4"     "EGFR_19_2"     "EGFR_Exon_19"
"Sample4"     "EGFR_19_1"     "EGFR_Exon_19"
"Sample5"     "EGFR_20_2"     "EGFR_Exon_20"
"Sample5"     "EGFR_20_1"     "EGFR_Exon_20"
"Sample5"     "EGFR_20_3"     "EGFR_Exon_20"
"Sample6"     "EGFR_21_2"     "EGFR_Exon_21"
"Sample6"     "EGFR_21_1"     "EGFR_Exon_21"
"Sample7"     "EGFR_22_1"     "EGFR_Exon_22"
HERE_TERMINATOR
 
# This load command assumes that the data is sitting in an official analysis 
# directory where the data is actually sitting in an sff subdirectory of the 
# analysisDir. If you have data sitting in an alternate analysis directory, 
# you can specify the analysis path
 
load   -analysisDir /data/sequencingRuns/EGFR_Run_Dir/EGFR_Analysis_Dir/ \
          -readGroup ReadGrp_1 -regions 1,2,3,4 \
          -symLink false -alias EGFR_reads
 
# If your read data is in a generic repository, rather than an official 
# analysis directory, you can comment out the load above and replace it with 
# one like the following where you have edited the sffDir path to point to the 
# sff files on your system.
 
#load –sffDir /data/sffFiles/EGFR_sff_files \
#       –readGroup ReadGrp_1 -filePrefix DGVS90J \
#       –regions 1,2,3,4 –symLink “false”
 
# If you don’t have access to the specific Read Data for this project
# you have already set up as much of the project as you can and 
# you won’t be able to run a computation on it. You should save the 
# project setup here and exit. You can open the project in the 
# GUI to see how the commands above have been translated into a 
# project setup.
 
# save
# exit
 
# This command creates the associations between the Read Data and 
# the Sample-Amplicon pairs. This command is only valid if you have 
# imported the Read Data from an analysis directory using EGFR_reads 
# as an alias. If you instead imported the Read Data from a 
# repository using actual file names, you would need to change the aliases 
# to actual file names (i.e. EGFR_reads01 to DGVS90J01).
 
assoc -file - << HERE_TERMINATOR
"readData"         "sample"
"EGFR_reads01"     "Sample1"
"EGFR_reads02"     "Sample2"
"EGFR_reads03"     "Sample6"
"EGFR_reads03"     "Sample7"
"EGFR_reads03"     "Sample3"
"EGFR_reads03"     "Sample5"
"EGFR_reads03"     "Sample4"
HERE_TERMINATOR
 
# The region 4 Read Data file is actually empty, so we should mark it as 
# not active so it gets excluded from the analysis.
 
update readData EGFR_reads04 -active false
 
# You should save the project setup now.
 
save
 
# Run the validateNames utility to be on the safe side. 
 
utility validateNames
 
# Check to see if there are any other problems with the project.
 
utility validateForComputation
 
# Trigger the start of the computation.
 
computation start
 
# Load the automatically detected variants discovered as part of the 
# computation.
 
computation loadDetectedVariants
 
# Report the measured variant frequencies to a tab-delimited output file.
 
report variantHits -outputFile EGFR_variant_hits.txt
 
# Close the project without saving. This will prevent the automatically 
# detected variants from being permanently added to the project.
# You will receive a warning about unsaved changes to the project.
 
close
 
# Exit the CLI. Your project setup and your computation results should now be 
# able to be viewed if you open the project in the GUI.
 
exit