From e5503ac406cf1ece33c8d550735dfbc89b90c29a Mon Sep 17 00:00:00 2001 From: Robert Olson Date: Tue, 13 Dec 2016 09:29:57 -0600 Subject: [PATCH] Add HTML version of Tom's tutorials. --- Tutorials/genome_groups.html | 100 ++++++++++++++++++++++++++++++++++ Tutorials/logging_in.html | 38 +++++++++++++ Tutorials/uploading_data.html | 55 +++++++++++++++++++ 3 files changed, 193 insertions(+) create mode 100644 Tutorials/genome_groups.html create mode 100644 Tutorials/logging_in.html create mode 100644 Tutorials/uploading_data.html diff --git a/Tutorials/genome_groups.html b/Tutorials/genome_groups.html new file mode 100644 index 0000000..ce55c7e --- /dev/null +++ b/Tutorials/genome_groups.html @@ -0,0 +1,100 @@ +

+How to create and access genome groups +

+ +Creating a genome group in your workspace allows you to create logical +groups of genomes for downstream comparative analysis. In this +example, you will create two genome groups. One genome group will +contain only Streptococcus aureus, and the second genome group will +contain all Streptococcus genomes except those from Streptococcus +aureus. +

+ +This example assumes familiarity with a few other commands in the CLI +to create the input file containing the genomes to be put in the new +genome group. You do not need to be familiar with these commands, just +the format of the input file. The format of the input file is simply a +list of genome ids, one per line with no other information in the +file. +

+

+$ p3-all-genomes --in genome_name,aureus > Staphylococcus.aureus.genomes
+$ p3-all-genomes --in genome_name,Staphylococcus > Staphylococcus.all.genomes
+$ a_not_b Staphylococcus.all.genomes Staphylococcus.aureus.genomes > Staphylococcus.not.aureus.genomes
+
+$ wc *.genomes
+    9257   41089  399759 Staphylococcus.all.genomes
+    8383   36955  356756 Staphylococcus.aureus.genomes
+     876    4146   43099 Staphylococcus.not.aureus.genomes
+   18516   82190  799614 total
+
+

+Let's take a quick look at a few entries in each file using the unix +head command. In this case, the first five lines of each file are +displayed. Notice that the header exists in two of the three files. It +is not in the file created with the a_not_b command because the header +appeared in both input files to the a_not_b command. +

+

+$ head -n 5 *.genomes
+==> Staphylococcus.all.genomes <==
+genome.genome_id
+904758.3
+904731.3
+904739.3
+904750.3
+
+==> Staphylococcus.aureus.genomes <==
+genome.genome_id
+904758.3
+904731.3
+904739.3
+904750.3
+
+==> Staphylococcus.not.aureus.genomes <==
+1000590.6
+1008454.3
+1034809.4
+1078083.3
+1115805.3
+
+ +

+ +The input files to create genome groups are almost ready. The input to +p3-put-genome-group is a single column file with the only values being +genome ids. The header needs to be removed. We can easily do this with +an editor, or use the unix grep command with the -v option. For this +example, we will just edit the file with an editor and remove the +header. +

+The p3-put-genome-group takes the list of genome ids on standard +input. Using the unix cat command we can send the contents of our +newly created files of genome ids to the p3-put-genome-group command +with the following command. +

+

+$ cat Staphylococcus.not.aureus.genomes | p3-put-genome-group "Staphlococcus not aureus"
+$ cat Staphylococcus.aureus.genomes | p3-put-genome-group "Staphylococcus aureus"
+
+

+ +The two newly created genome groups are now visible and usable in your +workspace using on the PATRIC web site, as well as accessible using +the command line interface. + +

+$ p3-get-genome-group "Staphylococcus aureus"
+904758.3
+904731.3
+904739.3
+904750.3
+904763.3
+904725.3
+904734.3
+904737.3
+904754.3
+904768.3
+<...>
+
+ diff --git a/Tutorials/logging_in.html b/Tutorials/logging_in.html new file mode 100644 index 0000000..e456461 --- /dev/null +++ b/Tutorials/logging_in.html @@ -0,0 +1,38 @@ +

Logging in

+ +For operations on private data, such as that data stored in your +workspace, you will need to be logged in. You can check to see if you +are already logged in using the p3-whoami command: + +
+$ p3-whoami
+You are logged in as:
+brettin@patricbrc.org
+
+ +

+If you were not logged in, when you run the p3-whoami command you +would see that you are not logged in. If this were the case, you would +not be able to upload to your workspace or see any of the data in your +workspace for example. +

+

+$ p3-whoami
+You are not logged in.
+
+ +

+ +If you are not logged in, you can do so using the p3-login +command. Notice that your user name contains the suffix +“@patricbrc.org”. This suffix is required so that your PATRIC +credentials are used rather than your RAST credentials. + +

+$ p3-login brettin@patricbrc.org
+Password: ****
+Logged in with username brettin@patricbrc.org
+$ p3-whoami
+You are logged in as:
+brettin@patricbrc.org
+
diff --git a/Tutorials/uploading_data.html b/Tutorials/uploading_data.html new file mode 100644 index 0000000..635b761 --- /dev/null +++ b/Tutorials/uploading_data.html @@ -0,0 +1,55 @@ +

+Uploading data from the command line into your workspace +

+ +The PATRIC workspace is a place where you can upload your data so that +it can be integrated with existing public data in PATRIC while at the +same time maintaining privacy. As an example, you can upload contigs +to your workspace, annotate them using the PATRIC annotation service, +and then compare the annotated results with publicly annotated genomes +in PATRIC. +

+ +In this example, I am going to upload contigs from my mac to my +workspace in PATRIC using the command line interface rather than using +the web interface for uploading contigs to my workspace. +

+

Uploading data

+ +The ws-create command is used to upload data to my workspace: + +
+$ ws-create -h
+ws-create.pl [-ahopu] [long options...]   
+	     -p --permission   Permissions for folders created
+	     -u --useshock     Upload file to shock and store link in workspace
+	     -o --overwrite    Overwrite existing destination object
+	     --wsurl           Workspace URL
+	     -a --admin        Run as administrator
+	     -h --help         Show this usage message
+$ ws-create -u /brettin@patricbrc.org/home/MinhashDev/UC.MICU.02.30.fastq Reads /home/brettin/assemblies/UC.MICU.02.30.fastq
+
+

+ +In this case, I used the -u option to tell the system to upload the genomes into the Shock bulk +storage system; for any file larger than a few kilobytes we recommend that this option be used. +

+If I want to verify the uploaded reads, I can use do a listing on +the folder that I uploaded the reads to. +

+

+$ ws-ls /brettin@patricbrc.org/home/MinhashDev
+
+Name                Owner                 Type       Moddate             Size       User perm Global perm
+UC.MICU.02.30.msh   brettin@patricbrc.org job_result 2016-10-01T03:04:01       1513 o         n          
+.UC.MICU.02.30.msh  brettin@patricbrc.org folder     2016-10-01T01:19:34          0 o         n          
+UC.MICU.02.30.fastq brettin@patricbrc.org reads      2016-09-30T21:34:12 8284314281 o         n    
+
+ +

+ +The folder listing includes fields such as owner, the object's name +(specified by first positional argument in the ws-create command) type +(specified by the second positional argument) and permissions +(specified by the third positional argument). +