RNASeq Comparison Land with PScript

From Array Suite Wiki

(Difference between revisions)
Jump to: navigation, search
(Create a Test Disease Land in GUI)
(Submit a PScript job to ArrayServer)
Line 65: Line 65:
[[image: serverjob_done.png]]
[[image: serverjob_done.png]]
All ALVs and TLVs could be published to the target comparison land automaticly, however the sample meta and the project meta has to be loaded manually.
All ALVs and TLVs will be published to the target ComparisonLand automatically. Sample and project metadata have to be loaded manually.
===Add Sample MetaData and Project MetaData to the Test Comparison Land===
===Add Sample MetaData and Project MetaData to the Test Comparison Land===

Revision as of 16:18, 3 May 2018



Land users are often interested in exploring data across multiple Lands, or comparing internal data with public OmicSoft Lands. Comparison Land is a type of ArrayLand, customized to store, integrate, and display both expression and comparison data from Omic projects. By creating a Comparison Land, users can search and compare differences in expression of genes, the fold change and significance calculations.

This page presents an ambitious Pscript that will automatically generate ComparisonLand from raw FASTQ files.

Input Dataset

For this demonstration, we will use the RNASeq_Tutorial RNA-seq tutorial dataset, starting with the fastq files. The full dataset is available on the SRA archives GSM958729 SRR521461-521463 and GSM958745 SRR521522-521524.

Step 1: Create a DiseaseLand

Create a Test Land in GUI

Create a Disease land by following the instruction here: Create_Land

Create comparison land.png
Description=Disease data from human studies have carefully curated and incorporated from GEO (Gene Expression Omnibus), SRA (Sequence Read Archive), ArrayExpress, and more.

Step 2: Run the Pscript

Workflow of the Pipeline Script

The pscript can be found at the bottom of the page. This section will describe how to install the script.

  1. Generate ALVs (ArrayLand Vector files) from raw FASTQ data
  2. Convert ALVs to osprj (OmicSoft Project file)
  3. Generate generate TLVs (ArrayLand Comparison files) from the osprj
  4. Fetch metadata tables

Add PScript to ArrayServer

After adding the PScript to ArrayServer, users could create Land ALV files (the input data type for Lands) TLV files (for comparison) and publish all file to target Land by running the customized RNASeq_Pipeline.

Customized RNA Pscript.png

Prepare inputs for the Pscript

This pipeline script executes a number of potentially complicated steps, including a full statistical analysis. To successfully run this script, care must be made to properly format each file.

Add Comparison Mapping and Project Meta files

The two EXCEL and the BamFileName.txt file for this tutorial set can be found below:


File:0502Raw2ComLand GPL11154.xlsx


Submit a PScript job to ArrayServer

After downloading the raw RNASeq fastq files to ArrayServer, and put all required txt and EXCEL files to the working directory, please follow the setup shown below to submit a server job:

ServerJob setup RNA.png

When the server job is done, ALVs, TLVs, Metadata files, and some other files would be available under the output folder:

Serverjob done.png

All ALVs and TLVs will be published to the target ComparisonLand automatically. Sample and project metadata have to be loaded manually.

Add Sample MetaData and Project MetaData to the Test Comparison Land

Warning.png WARNING: Please see This page for restrictions on metadata column names.

Once ALV files are published, users need to Manage Land Sample Metadata for visualization. Data cannot be viewed in the Sample Distribution view if Metadata have not been registered in the Land. Add sample metadata in Land Tab | Manage | Samples | Manage Sample Meta Data. If Manage Sample Meta Data is in grey (as in the screenshot below), you need to ask admin to change the Land permissions for you.

Manage samplemeta.png

The meta data table is required to have Sample ID, Subject ID, Primary Grouping, and Secondary Grouping columns exactly the way it was defined in the land.cfg file. Users can view the information that was provided in the land.cfg file by going to Manage | Show Land Statistics:


Below is an example of the Sample Metadata file that would match the Test Oncoland from above.

Design metadata.png

In the Manage Sample Meta Data page, users can click Add/Replace tab to add metadata table:

Load SampleMeta fromOSOBJ.png

If you want users to be able to open RNA-Seq bam files in the Genome Browser directly from Land Views (Browse Selected Samples, the meta data table needs a "BamFileName" column and the Land configuration needs a few BAM/BAS configuration options.

Explore the Comparison Land created

After uploading metadata, the land views should be available.

Explor comparison land.png

The PScript

Label=RNA-Seq Custom Pipeline Raw2ComparisonLand
Description=This pipeline will map fastqs to human genome, generate ALVs, create osprj, and convert to TLVs, then publish them to a target comparison Land
ExternalScriptMenuText= RNASeq_Pipeline_DESeq
ExternalScriptFileFilter=TXT files|*.fastq|*.gz|*.txt|*.fastq.gz
~@PairedSamples@=Data is paired. Options are True or False (True by default)
~@ThreadNumberPerJob@=Number of threads to run for each of the steps.
~@ParallelJobNumber@=Number of parallel jobs to run for each of the steps
~@Gzip@=Set to Gzip if input files are gzipped or None
~@OutputFolder@=Output folder for results and BAM files
~@StandaloneProjectName@=Input the name for the server project
~@ComparisonMetadata@=Comparison Meta Data
~@SampleProjectMetadata@=Sample Design for Server Project
~@SampleBam@=Sample Bam Files
~@ComparisonLandName@=Input the name for the Comparison Land
//Mapping Section
Begin RnaSeqPipeline /Namespace=NgsLib /RunOnServer=True;
Reference Human.B37.3;
GeneModel OmicsoftGene20130723;
NgsQCWizard /Run=False;
FilterNgsFiles /Run=True;
Count /Run=True /AutoTrimUtr=True;
RnaSeqQCMetrics /Run=False;
SummarizeExonJunction /Run=False;
SummarizeMutation2Snp /Run=False;
CombinedFusionAnalysis /Run=False;
GenerateBas /Run=False;
GenerateLandAlv /Run=True;
Options /ParallelJobNumber=32 /ThreadNumberPerJob=8 /PairedEnd=@PairedSamples@ /FileFormat=AUTO /OutputFolder="@OutputFolder@" /CompressionMethod=Gzip /Gzip=True /Replace=False;
Output ;
//Save project
Begin SaveProject;
//Convert ALV files to simple Omicsoft project, *****DESeq2 is ued for DEG identification*****
Begin ComparisonLandTools /Namespace=NgsLib;
SearchFiles "@OutputFolder@/ALV/RnaSeq_Transcript" /Pattern=*.alv /Recursive=True;
    Reference Human.B37.3;
    GeneModel OmicsoftGene20130723;
//Save project
Begin SaveProject;
//Convert Omicsoft project to TLV file
Begin ComparisonLandTools /Namespace=NgsLib;
Files "@OutputFolder@/TLV/@StandaloneProjectName@.osprj";
    Reference Human.B37.3;
    GeneModel OmicsoftGene20130723; 
Begin SaveProject;
//Extract metadata from information file 
Begin ComparisonLandTools /Namespace=NgsLib;
Files "@SampleProjectMetadata@";
Begin SaveProject;
//publish ALVs and TLVs to target Comparison Land
Begin PublishAlv /Namespace=Land;
Land @ComparisonLandName@;
InputFolder "@OutputFolder@/ALV/RnaSeq_Transcript";
Exclude "";
Options /UseSgen=True /Memory=8GB /Recursive=True /PublishMode=Auto /ParallelJobNumber=4 /DataTypes=(all);
Begin PublishAlv /Namespace=Land;
Land @ComparisonLandName@;
InputFolder "@OutputFolder@/TLV/RnaSeq";
Exclude "";
Options /UseSgen=True /Memory=8GB /Recursive=True /PublishMode=Auto /ParallelJobNumber=4 /DataTypes=(all);
Begin SaveProject;
[back to top]