-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add HTML version of Tom's tutorials.
- Loading branch information
Showing
3 changed files
with
193 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<h1> | ||
How to create and access genome groups | ||
</h1> | ||
|
||
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. | ||
<p> | ||
|
||
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. | ||
<p> | ||
<pre> | ||
$ 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 | ||
</pre> | ||
<p> | ||
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. | ||
<p> | ||
<pre> | ||
$ 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 | ||
</pre> | ||
|
||
<p> | ||
|
||
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. | ||
<p> | ||
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. | ||
<p> | ||
<pre> | ||
$ cat Staphylococcus.not.aureus.genomes | p3-put-genome-group "Staphlococcus not aureus" | ||
$ cat Staphylococcus.aureus.genomes | p3-put-genome-group "Staphylococcus aureus" | ||
</pre> | ||
<p> | ||
|
||
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. | ||
|
||
<pre> | ||
$ 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 | ||
<...> | ||
</pre> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<h1>Logging in</h1> | ||
|
||
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: | ||
|
||
<pre> | ||
$ p3-whoami | ||
You are logged in as: | ||
[email protected] | ||
</pre> | ||
|
||
<p> | ||
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. | ||
<p> | ||
<pre> | ||
$ p3-whoami | ||
You are not logged in. | ||
</pre> | ||
|
||
<p> | ||
|
||
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. | ||
|
||
<pre> | ||
$ p3-login [email protected] | ||
Password: **** | ||
Logged in with username [email protected] | ||
$ p3-whoami | ||
You are logged in as: | ||
[email protected] | ||
</pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<h1> | ||
Uploading data from the command line into your workspace | ||
</h1> | ||
|
||
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. | ||
<p> | ||
|
||
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. | ||
<p> | ||
<h2>Uploading data</h2> | ||
|
||
The ws-create command is used to upload data to my workspace: | ||
|
||
<pre> | ||
$ ws-create -h | ||
ws-create.pl [-ahopu] [long options...] <name> <type> <filename> | ||
-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 /[email protected]/home/MinhashDev/UC.MICU.02.30.fastq Reads /home/brettin/assemblies/UC.MICU.02.30.fastq | ||
</pre> | ||
<p> | ||
|
||
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. | ||
<p> | ||
If I want to verify the uploaded reads, I can use do a listing on | ||
the folder that I uploaded the reads to. | ||
<p> | ||
<pre> | ||
$ ws-ls /[email protected]/home/MinhashDev | ||
|
||
Name Owner Type Moddate Size User perm Global perm | ||
UC.MICU.02.30.msh [email protected] job_result 2016-10-01T03:04:01 1513 o n | ||
.UC.MICU.02.30.msh [email protected] folder 2016-10-01T01:19:34 0 o n | ||
UC.MICU.02.30.fastq [email protected] reads 2016-09-30T21:34:12 8284314281 o n | ||
</pre> | ||
|
||
<p> | ||
|
||
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). | ||
|