-----------------------
Need shift 5 command (have more than 9 arguments):
-----------------------
-----------------------
Start of variable list:
-----------------------
SCRIPT_DIR:
/restricted/projectnb/waxmanlab/kkarri/liver_zonation/infusion_rerun/Scripts/08a_DiffExp_5_HTSeq
Dataset_DIR:
/restricted/projectnb/waxmanlab/kkarri/liver_zonation/infusion
Dataset_Label:
LZ
GTF_Files_DIR:
/unprotected/projects/waxmanlab/routines/GTF_Files
ANNOTATION_FILE:
RefSeq_GeneBody.gtf
CONDITION_1_NAME:
NoInf_KO
CONDITION_2_NAME:
120Inf_KO
Lengths_DIR:
/unprotected/projects/waxmanlab/routines/GTF_Files/lengths
GENE_LENGTHS_FILE:
Exon_Regions_Lengths.txt
COUNT_DIR:
RefSeq_Exon_GTF
OUTPUT_PREFIX:
DiffExp_v2_GeneBody
DiffExp_Index:
DiffExp_5a
COL_SUFFIX:
GeneBody
COUNT_PROGRAM:
HTSeq
-----------------------
End of variable list
-----------------------
==========================================================
Starting on : Mon May 14 12:44:58 EDT 2018
Running on node : scc-kb1
Current directory : /restricted/projectnb/waxmanlab/kkarri/liver_zonation/infusion_rerun/Scripts/08a_DiffExp_5_HTSeq
Current job ID : 6187913
Current job name : Step_08a_DiffExp_5a
Task index number : undefined
Parameter for multiple cores : 1
==========================================================

Change dir to scratch directory


Print scratch directory location:

/scratch/6187913.1.linga

Loading required modules...

------------------------------------------
Sample_DIR:
LZ_M16
Sample_ID:
LZ_M16
Description:
NoInf_KO1
M_Num:
M16
Copy Condition_1 sample count files to Condition_1 folder
calculate mapped reads: LZ_M16
Sample_DIR:
LZ_M17
Sample_ID:
LZ_M17
Description:
NoInf_KO2
M_Num:
M17
Copy Condition_1 sample count files to Condition_1 folder
calculate mapped reads: LZ_M17
Sample_DIR:
LZ_M18
Sample_ID:
LZ_M18
Description:
NoInf_KO3
M_Num:
M18
Copy Condition_1 sample count files to Condition_1 folder
calculate mapped reads: LZ_M18
M_Num_Cond1_List:
M16M17M18
------------------------------------------
------------------------------------------
Sample_DIR:
LZ_M31
Sample_ID:
LZ_M31
Description:
120Inf_KO1
M_Num:
M31
Copy Condition_2 sample count files to Condition_2 folder
calculate mapped reads: LZ_M31
Sample_DIR:
LZ_M32
Sample_ID:
LZ_M32
Description:
120Inf_KO2
M_Num:
M32
Copy Condition_2 sample count files to Condition_2 folder
calculate mapped reads: LZ_M32
Sample_DIR:
LZ_M33
Sample_ID:
LZ_M33
Description:
120Inf_KO3
M_Num:
M33
Copy Condition_2 sample count files to Condition_2 folder
calculate mapped reads: LZ_M33
Sample_DIR:
LZ_M34
Sample_ID:
LZ_M34
Description:
120Inf_KO3
M_Num:
M34
Copy Condition_2 sample count files to Condition_2 folder
calculate mapped reads: LZ_M34
M_Num_Cond2_List:
M31M32M33M34
------------------------------------------
==========================================================

Number of replicates in each condition:

NUM_REP_CONDITION1: 3
NUM_REP_CONDITION1: 3
==========================================================

Renaming input count files

Counting program: HTSeq
Removing last 5 lines (remove special counters)
Counting program: HTSeq
Removing last 5 lines (remove special counters)
Counting program: HTSeq
Removing last 5 lines (remove special counters)
Counting program: HTSeq
Removing last 5 lines (remove special counters)
Counting program: HTSeq
Removing last 5 lines (remove special counters)
Counting program: HTSeq
Removing last 5 lines (remove special counters)
Counting program: HTSeq
Removing last 5 lines (remove special counters)
number of mapped reads
13129683
17473331
15643222
17693260
12477518
14799385
12279245
==========================================================

List files in Input

-rw-r--r-- 1 kkarri waxmanlab 245851 May 14 12:45 /scratch/6187913.1.linga/Input/120Inf_KO0.out
-rw-r--r-- 1 kkarri waxmanlab      9 May 14 12:44 /scratch/6187913.1.linga/Input/120Inf_KO0_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 247883 May 14 12:45 /scratch/6187913.1.linga/Input/120Inf_KO1.out
-rw-r--r-- 1 kkarri waxmanlab      9 May 14 12:44 /scratch/6187913.1.linga/Input/120Inf_KO1_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 247447 May 14 12:45 /scratch/6187913.1.linga/Input/120Inf_KO2.out
-rw-r--r-- 1 kkarri waxmanlab      9 May 14 12:44 /scratch/6187913.1.linga/Input/120Inf_KO2_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 247886 May 14 12:45 /scratch/6187913.1.linga/Input/120Inf_KO3.out
-rw-r--r-- 1 kkarri waxmanlab      9 May 14 12:45 /scratch/6187913.1.linga/Input/120Inf_KO3_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 291522 May 14 12:45 /scratch/6187913.1.linga/Input/Exon_Regions_Lengths.txt
-rw-r--r-- 1 kkarri waxmanlab 246264 May 14 12:45 /scratch/6187913.1.linga/Input/NoInf_KO0.out
-rw-r--r-- 1 kkarri waxmanlab      9 May 14 12:44 /scratch/6187913.1.linga/Input/NoInf_KO0_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 246926 May 14 12:45 /scratch/6187913.1.linga/Input/NoInf_KO1.out
-rw-r--r-- 1 kkarri waxmanlab      9 May 14 12:44 /scratch/6187913.1.linga/Input/NoInf_KO1_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 246038 May 14 12:45 /scratch/6187913.1.linga/Input/NoInf_KO2.out
-rw-r--r-- 1 kkarri waxmanlab      9 May 14 12:44 /scratch/6187913.1.linga/Input/NoInf_KO2_num_mapped_reads.txt

/scratch/6187913.1.linga/Input/120Inf_KO:
total 8
drwxr-xr-x 2 kkarri waxmanlab 4096 May 14 12:45 .
drwxr-xr-x 4 kkarri waxmanlab 4096 May 14 12:45 ..

/scratch/6187913.1.linga/Input/NoInf_KO:
total 8
drwxr-xr-x 2 kkarri waxmanlab 4096 May 14 12:45 .
drwxr-xr-x 4 kkarri waxmanlab 4096 May 14 12:45 ..
==========================================================

Starting to run my commands

Printing Rscript command:
Rscript differentialAnalysis.R NoInf_KO 120Inf_KO 3 4 RefSeq_GeneBody.gtf /scratch/6187913.1.linga/Input DiffExp_v2_GeneBody Exon_Regions_Lengths.txt
[1] "Arguments for differentialAnalysisDESeq.R:"
[1] "NoInf_KO"
[1] "120Inf_KO"
[1] 3
[1] 4
[1] "RefSeq_GeneBody.gtf"
[1] "/scratch/6187913.1.linga/Input"
[1] "DiffExp_v2_GeneBody"
[1] "Exon_Regions_Lengths.txt"
load GTF file ... 
parse attributes ... 
[1] "output file is in: /scratch/6187913.1.linga/Input/DiffExp_v2_GeneBody_NoInf_KO_120Inf_KO.txt"
==========================================================

Create SEGEX formatted file:

Printing Rscript command:
Rscript formatForSegex_ver3.R  DiffExp_v2_GeneBody_NoInf_KO_120Inf_KO.txt 120Inf_KO_LZ_M31M32M33M34_vs_NoInf_KO_LZ_M16M17M18_DiffExp_v2_GeneBody_forSEGEXUpload 1 GeneBody
==========================================================
Comparison_Info:
120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18
#----------------------------------------------------------------------------------
Running Diff_Genes.R
#----------------------------------------------------------------------------------
Printing Rscript command:
Rscript Diff_Genes.R 120Inf_KO_LZ_M31M32M33M34_vs_NoInf_KO_LZ_M16M17M18_DiffExp_v2_GeneBody_forSEGEXUpload_DESeq.txt 2 0.05 DESeq GeneBody'_'120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18
[1] "Print arguments:"
[1] "-----------------"
[1] "Differential expression_Output:"
[1] "120Inf_KO_LZ_M31M32M33M34_vs_NoInf_KO_LZ_M16M17M18_DiffExp_v2_GeneBody_forSEGEXUpload_DESeq.txt"
[1] "fold_change_cutoff:"
[1] "2"
[1] "padj_cutoff:"
[1] "0.05"
[1] "postfix:"
[1] "DESeq"
[1] "count_method:"
[1] "GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18"
[1] "-----------------"
[1] "Differential Gene Counts"
[1] "Number of significant differential genes with positive fold change (Up Genes):"
[1] 48  7
[1] "Number of significant differential genes with negative fold change (Down Genes):"
[1] 22  7
[1] "Check out Up_Genes_DESeq_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt!"
[1] "Check out Down_Genes_DESeq_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt!"
Rscript Diff_Genes.R 120Inf_KO_LZ_M31M32M33M34_vs_NoInf_KO_LZ_M16M17M18_DiffExp_v2_GeneBody_forSEGEXUpload_EdgeR.txt 2 0.05 EdgeR GeneBody'_'120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18
[1] "Print arguments:"
[1] "-----------------"
[1] "Differential expression_Output:"
[1] "120Inf_KO_LZ_M31M32M33M34_vs_NoInf_KO_LZ_M16M17M18_DiffExp_v2_GeneBody_forSEGEXUpload_EdgeR.txt"
[1] "fold_change_cutoff:"
[1] "2"
[1] "padj_cutoff:"
[1] "0.05"
[1] "postfix:"
[1] "EdgeR"
[1] "count_method:"
[1] "GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18"
[1] "-----------------"
[1] "Differential Gene Counts"
[1] "Number of significant differential genes with positive fold change (Up Genes):"
[1] 129   7
[1] "Number of significant differential genes with negative fold change (Down Genes):"
[1] 90  7
[1] "Check out Up_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt!"
[1] "Check out Down_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt!"
#----------------------------------------------------------------------------------
Running Venn_Diff_Genes.R
#----------------------------------------------------------------------------------
Printing Rscript command:
#----------------------------------------------------------------------------------
Rscript Venn_Diff_Genes.R Down_Genes_DESeq_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt Down_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt GeneBody_Counting DiffExp_5a
[1] "Print arguments:"
[1] "-----------------"
[1] "File1:"
[1] "Down_Genes_DESeq_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt"
[1] "File2:"
[1] "Down_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt"
[1] "Subtitle:"
[1] "GeneBody_Counting"
[1] "DiffExp_Index:"
[1] "DiffExp_5a"
[1] "-----------------"
[1] "Down.DESeq.GeneBody.HTSeq"
[1] "Down.EdgeR.GeneBody.HTSeq"
null device 
          1 
[1] "Removing VennDiagram*.log files"
[1] "Check out Venn diagram and Count.Table!"
#----------------------------------------------------------------------------------
Rscript Venn_Diff_Genes.R Up_Genes_DESeq_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt Up_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt GeneBody_Counting DiffExp_5a
[1] "Print arguments:"
[1] "-----------------"
[1] "File1:"
[1] "Up_Genes_DESeq_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt"
[1] "File2:"
[1] "Up_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt"
[1] "Subtitle:"
[1] "GeneBody_Counting"
[1] "DiffExp_Index:"
[1] "DiffExp_5a"
[1] "-----------------"
[1] "Up.DESeq.GeneBody.HTSeq"
[1] "Up.EdgeR.GeneBody.HTSeq"
null device 
          1 
[1] "Removing VennDiagram*.log files"
[1] "Check out Venn diagram and Count.Table!"
#----------------------------------------------------------------------------------
#----------------------------------------------------------------------------------
Merging Count.Table(s) into one text file
#----------------------------------------------------------------------------------
==========================================================
Renaming the Differential_Expression_File
==========================================================

List files in Input

-rw-r--r-- 1 kkarri waxmanlab  245851 May 14 12:45 /scratch/6187913.1.linga/Input/120Inf_KO0.out
-rw-r--r-- 1 kkarri waxmanlab       9 May 14 12:44 /scratch/6187913.1.linga/Input/120Inf_KO0_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab  247883 May 14 12:45 /scratch/6187913.1.linga/Input/120Inf_KO1.out
-rw-r--r-- 1 kkarri waxmanlab       9 May 14 12:44 /scratch/6187913.1.linga/Input/120Inf_KO1_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab  247447 May 14 12:45 /scratch/6187913.1.linga/Input/120Inf_KO2.out
-rw-r--r-- 1 kkarri waxmanlab       9 May 14 12:44 /scratch/6187913.1.linga/Input/120Inf_KO2_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab  247886 May 14 12:45 /scratch/6187913.1.linga/Input/120Inf_KO3.out
-rw-r--r-- 1 kkarri waxmanlab       9 May 14 12:45 /scratch/6187913.1.linga/Input/120Inf_KO3_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 3176859 May 14 12:47 /scratch/6187913.1.linga/Input/120Inf_KO_LZ_M31M32M33M34_vs_NoInf_KO_LZ_M16M17M18_DiffExp_v2_GeneBody_forSEGEXUpload_DESeq.txt
-rw-r--r-- 1 kkarri waxmanlab 3055874 May 14 12:47 /scratch/6187913.1.linga/Input/120Inf_KO_LZ_M31M32M33M34_vs_NoInf_KO_LZ_M16M17M18_DiffExp_v2_GeneBody_forSEGEXUpload_EdgeR.txt
-rw-r--r-- 1 kkarri waxmanlab     291 May 14 12:47 /scratch/6187913.1.linga/Input/DiffExp_5a_Venn_Tables_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt
-rw-r--r-- 1 kkarri waxmanlab 8591198 May 14 12:47 /scratch/6187913.1.linga/Input/DiffExp_v2_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt
-rwxr-xr-x 1 kkarri waxmanlab    7394 May 14 12:44 /scratch/6187913.1.linga/Input/Diff_Genes.R
-rw-r--r-- 1 kkarri waxmanlab    2361 May 14 12:47 /scratch/6187913.1.linga/Input/Down_Genes_DESeq_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt
-rw-r--r-- 1 kkarri waxmanlab    9034 May 14 12:47 /scratch/6187913.1.linga/Input/Down_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt
-rw-r--r-- 1 kkarri waxmanlab  291522 May 14 12:45 /scratch/6187913.1.linga/Input/Exon_Regions_Lengths.txt
-rw-r--r-- 1 kkarri waxmanlab  246264 May 14 12:45 /scratch/6187913.1.linga/Input/NoInf_KO0.out
-rw-r--r-- 1 kkarri waxmanlab       9 May 14 12:44 /scratch/6187913.1.linga/Input/NoInf_KO0_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab  246926 May 14 12:45 /scratch/6187913.1.linga/Input/NoInf_KO1.out
-rw-r--r-- 1 kkarri waxmanlab       9 May 14 12:44 /scratch/6187913.1.linga/Input/NoInf_KO1_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab  246038 May 14 12:45 /scratch/6187913.1.linga/Input/NoInf_KO2.out
-rw-r--r-- 1 kkarri waxmanlab       9 May 14 12:44 /scratch/6187913.1.linga/Input/NoInf_KO2_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab    4531 May 14 12:47 /scratch/6187913.1.linga/Input/Up_Genes_DESeq_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt
-rw-r--r-- 1 kkarri waxmanlab   11931 May 14 12:47 /scratch/6187913.1.linga/Input/Up_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18.txt
-rwxr-xr-x 1 kkarri waxmanlab    9553 May 14 12:44 /scratch/6187913.1.linga/Input/Venn_Diff_Genes.R
-rw-r--r-- 1 kkarri waxmanlab   37274 May 14 12:47 /scratch/6187913.1.linga/Input/Venn_Down.DESeq.GeneBody.HTSeq.Down.EdgeR.GeneBody.HTSeq.png
-rw-r--r-- 1 kkarri waxmanlab   36854 May 14 12:47 /scratch/6187913.1.linga/Input/Venn_Up.DESeq.GeneBody.HTSeq.Up.EdgeR.GeneBody.HTSeq.png
-rwxr-xr-x 1 kkarri waxmanlab    3925 May 14 12:44 /scratch/6187913.1.linga/Input/formatForSegex_ver3.R

/scratch/6187913.1.linga/Input/120Inf_KO:
total 8
drwxr-xr-x 2 kkarri waxmanlab 4096 May 14 12:45 .
drwxr-xr-x 4 kkarri waxmanlab 4096 May 14 12:47 ..

/scratch/6187913.1.linga/Input/NoInf_KO:
total 8
drwxr-xr-x 2 kkarri waxmanlab 4096 May 14 12:45 .
drwxr-xr-x 4 kkarri waxmanlab 4096 May 14 12:47 ..
==========================================================

List files in scratch

total 72M
drwx------   3 kkarri waxmanlab 4.0K May 14 12:47 .
drwxrwxrwt. 55 root   root      180K May 14 12:47 ..
-rw-r--r--   1 kkarri waxmanlab  105 May 14 12:44 Condition_1.txt
-rw-r--r--   1 kkarri waxmanlab  133 May 14 12:44 Condition_2.txt
drwxr-xr-x   4 kkarri waxmanlab 4.0K May 14 12:47 Input
-rw-r--r--   1 kkarri waxmanlab  72M May 14 12:44 RefSeq_GeneBody.gtf
-rwxr-xr-x   1 kkarri waxmanlab  16K May 14 12:44 differentialAnalysis.R

==========================================================
Re-naming files in OUTPUT_DIR
Need to append the COUNT_PROGRAM name to all output files

List files in OUTPUT_DIR

total 11M
drwxr-sr-x 2 kkarri waxmanlab  32K May 14 12:47 .
drwxr-sr-x 7 kkarri waxmanlab  32K May 14 12:44 ..
-rw-r--r-- 1 kkarri waxmanlab 3.1M May 14 12:47 120Inf_KO_LZ_M31M32M33M34_vs_NoInf_KO_LZ_M16M17M18_DiffExp_v2_GeneBody_forSEGEXUpload_DESeq_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab 3.0M May 14 12:47 120Inf_KO_LZ_M31M32M33M34_vs_NoInf_KO_LZ_M16M17M18_DiffExp_v2_GeneBody_forSEGEXUpload_EdgeR_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab  291 May 14 12:47 DiffExp_5a_Venn_Tables_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab 8.2M May 14 12:47 DiffExp_v2_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab 2.4K May 14 12:47 Down_Genes_DESeq_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab 8.9K May 14 12:47 Down_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab 4.5K May 14 12:47 Up_Genes_DESeq_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab  12K May 14 12:47 Up_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M31M32M33M34_NoInf_KO_LZ_M16M17M18_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab  37K May 14 12:47 Venn_Down.DESeq.GeneBody.HTSeq.Down.EdgeR.GeneBody.HTSeq_HTSeq.png
-rw-r--r-- 1 kkarri waxmanlab  36K May 14 12:47 Venn_Up.DESeq.GeneBody.HTSeq.Up.EdgeR.GeneBody.HTSeq_HTSeq.png
==========================================================
==========================================================
Finished on : Mon May 14 12:47:56 EDT 2018
2 minutes and 58 seconds elapsed.
==========================================================
