Call Mageck in PScript

From Array Suite Wiki

Jump to: navigation, search


Contents

An Pscript to Call Mageck and load outputed tables

This script was contributed by Jeff Du for OmicSoft community use. Designed to call Mageck, this can be used to import two expression matrices, to be loaded into a Server project.

It was written to be exposed to GUI, allowing other Array Studio users to load input data to Mageck and get the output tables.

Overall Design

  • Pre-requirments
    • Linux OS with ArrayServer running
    • Mageck has been correctly installed, PATH has been configured
  • Users run Pipeline script to choose input file for Mageck
    • Two parameters:
      • The input file needs to be in a location where ArrayServer can read, so that the command line could be executed
      • Specify an output folder to keep all the output matrices
  • run a OScript section, to load output table to Server project
  • run another OScript section, to load the second output table to server project

Call Mageck and load output matrices.pscript

<Info>
Label= Call Mageck from PScript
Description=PS to Call Mageck with RefGene, save demo summary file
Category=NGS\Mageck_test
 
 
<Input>
ExternalScriptInputType=Files
ExternalScriptMenuText= Mageck Custom Pipeline
ExternalScriptMenuStructure=NGS\Mageck_test
ExternalScriptFileFilter=FASTQ files|*.fastq|.gz|*.gz|*.txt
 
 
@ThreadNumberPerJob@=4
~@ThreadNumberPerJob@=Number of threads to run for each of the steps.
~@ThreadNumerPerJob@Levels=1,2,3,4,5,6,7,8
~@ThreadNumberPerJob@ExclusiveLevels=True
 
 
@ParallelJobNumber@=8
~@ParallelJobNumber@=Number of parallel jobs to run for each of the steps
 
@Gzip@=Gzip
~@Gzip@=Set to Gzip if input files are gzipped or None
~@Gzip@Levels=Gzip,None
~@Gzip@ExclusiveLevels=True
 
 
@OutputFolderName@=
~@OutputFolderName@Type=FilePath
~@OutputFolderName@=Output folder for results and summary files
 
 
<Script>
//Call mageck section
Begin RunEScript /RunonServer=True;
Files
"@FileNames@";
 
EScriptName Mageck;
Command mkdir "@OutputFolderName@/output0406"; 
Command cd "@OutputFolderName@/output0406";
Command pwd;
Command mageck "test" -k "%FilePath%" -t "HL60.final,KBM7.final" -c "HL60.initial,KBM7.initial"  -n "demo";
Options /ParallelJobNumber=1 /ThreadNumberPerJob=8 /ErrorOnStdErr=False;
End;
 
Begin SaveProject;
End;
 
Begin ImportTable /Namespace=Table /RunOnServer=True;
#Project 0406_Mageck_test;
File "@OutputFolderName@/output0406/demo.gene_summary.txt";
Options  /Format=Txt;
End;
 
 
Begin SaveProject;
End;
 
 
Begin ImportTable /Namespace=Table /RunOnServer=True;
#Project 0406_Mageck_test;
File "@OutputFolderName@/output0406/demo.sgrna_summary.txt";
Options  /Format=Txt;
End;
 
 
Begin SaveProject;
End;

Check Mageck installation

Be sure to set /Path/ for Mageck

Call mageck.png


Add call_Mageck_fromAS PScript to ArrayServer

After saving the pscript to a *.pscript file, go to ArrayServer -> Manage -> Script. in the Manage Server Scripts window, cleck Add Script, and load the pscript.

Add pscript.png

Workflow to call Mageck in ArrayStudio

  • Create a server project
  • Go to Scripts -> NGS -> Mageck_test -> MageckCustomPipeline

NewProjectcallMageck.png

  • Specify input file and output folder

Specify input output.png

  • Output matrices

Output mageck.png

[back to top]


EnvelopeLarge2.png