-----------------------
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_7_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_WT
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_7a
COL_SUFFIX:
GeneBody
COUNT_PROGRAM:
HTSeq
-----------------------
End of variable list
-----------------------
==========================================================
Starting on : Mon May 14 12:44:58 EDT 2018
Running on node : scc-ka4
Current directory : /restricted/projectnb/waxmanlab/kkarri/liver_zonation/infusion_rerun/Scripts/08a_DiffExp_7_HTSeq
Current job ID : 6187919
Current job name : Step_08a_DiffExp_7a
Task index number : undefined
Parameter for multiple cores : 1
==========================================================

Change dir to scratch directory


Print scratch directory location:

/scratch/6187919.1.linga

Loading required modules...

------------------------------------------
Sample_DIR:
LZ_M13
Sample_ID:
LZ_M13
Description:
NoInf_WT1
M_Num:
M13
Copy Condition_1 sample count files to Condition_1 folder
calculate mapped reads: LZ_M13
Sample_DIR:
LZ_M14
Sample_ID:
LZ_M14
Description:
NoInf_WT2
M_Num:
M14
Copy Condition_1 sample count files to Condition_1 folder
calculate mapped reads: LZ_M14
Sample_DIR:
LZ_M15
Sample_ID:
LZ_M15
Description:
NoInf_WT3
M_Num:
M15
Copy Condition_1 sample count files to Condition_1 folder
calculate mapped reads: LZ_M15
M_Num_Cond1_List:
M13M14M15
------------------------------------------
------------------------------------------
Sample_DIR:
LZ_M27
Sample_ID:
LZ_M27
Description:
120Inf_WT1
M_Num:
M27
Copy Condition_2 sample count files to Condition_2 folder
calculate mapped reads: LZ_M27
Sample_DIR:
LZ_M28
Sample_ID:
LZ_M28
Description:
120Inf_WT2
M_Num:
M28
Copy Condition_2 sample count files to Condition_2 folder
calculate mapped reads: LZ_M28
Sample_DIR:
LZ_M29
Sample_ID:
LZ_M29
Description:
120Inf_WT3
M_Num:
M29
Copy Condition_2 sample count files to Condition_2 folder
calculate mapped reads: LZ_M29
Sample_DIR:
LZ_M30
Sample_ID:
LZ_M30
Description:
120Inf_WT4
M_Num:
M30
Copy Condition_2 sample count files to Condition_2 folder
calculate mapped reads: LZ_M30
M_Num_Cond2_List:
M27M28M29M30
------------------------------------------
==========================================================

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
17997472
14541218
15341066
11769783
18780983
16794942
14882109
==========================================================

List files in Input

-rw-r--r-- 1 kkarri waxmanlab 248035 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO0.out
-rw-r--r-- 1 kkarri waxmanlab      9 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO0_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 246689 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO1.out
-rw-r--r-- 1 kkarri waxmanlab      9 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO1_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 246791 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO2.out
-rw-r--r-- 1 kkarri waxmanlab      9 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO2_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 245838 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO3.out
-rw-r--r-- 1 kkarri waxmanlab      9 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO3_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 291522 May 14 12:45 /scratch/6187919.1.linga/Input/Exon_Regions_Lengths.txt
-rw-r--r-- 1 kkarri waxmanlab 248221 May 14 12:45 /scratch/6187919.1.linga/Input/NoInf_WT0.out
-rw-r--r-- 1 kkarri waxmanlab      9 May 14 12:44 /scratch/6187919.1.linga/Input/NoInf_WT0_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 247724 May 14 12:45 /scratch/6187919.1.linga/Input/NoInf_WT1.out
-rw-r--r-- 1 kkarri waxmanlab      9 May 14 12:44 /scratch/6187919.1.linga/Input/NoInf_WT1_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 246958 May 14 12:45 /scratch/6187919.1.linga/Input/NoInf_WT2.out
-rw-r--r-- 1 kkarri waxmanlab      9 May 14 12:44 /scratch/6187919.1.linga/Input/NoInf_WT2_num_mapped_reads.txt

/scratch/6187919.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/6187919.1.linga/Input/NoInf_WT:
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_WT 120Inf_KO 3 4 RefSeq_GeneBody.gtf /scratch/6187919.1.linga/Input DiffExp_v2_GeneBody Exon_Regions_Lengths.txt
[1] "Arguments for differentialAnalysisDESeq.R:"
[1] "NoInf_WT"
[1] "120Inf_KO"
[1] 3
[1] 4
[1] "RefSeq_GeneBody.gtf"
[1] "/scratch/6187919.1.linga/Input"
[1] "DiffExp_v2_GeneBody"
[1] "Exon_Regions_Lengths.txt"
load GTF file ... 
parse attributes ... 
[1] "output file is in: /scratch/6187919.1.linga/Input/DiffExp_v2_GeneBody_NoInf_WT_120Inf_KO.txt"
==========================================================

Create SEGEX formatted file:

Printing Rscript command:
Rscript formatForSegex_ver3.R  DiffExp_v2_GeneBody_NoInf_WT_120Inf_KO.txt 120Inf_KO_LZ_M27M28M29M30_vs_NoInf_WT_LZ_M13M14M15_DiffExp_v2_GeneBody_forSEGEXUpload 1 GeneBody
==========================================================
Comparison_Info:
120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15
#----------------------------------------------------------------------------------
Running Diff_Genes.R
#----------------------------------------------------------------------------------
Printing Rscript command:
Rscript Diff_Genes.R 120Inf_KO_LZ_M27M28M29M30_vs_NoInf_WT_LZ_M13M14M15_DiffExp_v2_GeneBody_forSEGEXUpload_DESeq.txt 2 0.05 DESeq GeneBody'_'120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15
[1] "Print arguments:"
[1] "-----------------"
[1] "Differential expression_Output:"
[1] "120Inf_KO_LZ_M27M28M29M30_vs_NoInf_WT_LZ_M13M14M15_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_M27M28M29M30_NoInf_WT_LZ_M13M14M15"
[1] "-----------------"
[1] "Differential Gene Counts"
[1] "Number of significant differential genes with positive fold change (Up Genes):"
[1] 11  7
[1] "Number of significant differential genes with negative fold change (Down Genes):"
[1] 11  7
[1] "Check out Up_Genes_DESeq_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt!"
[1] "Check out Down_Genes_DESeq_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt!"
Rscript Diff_Genes.R 120Inf_KO_LZ_M27M28M29M30_vs_NoInf_WT_LZ_M13M14M15_DiffExp_v2_GeneBody_forSEGEXUpload_EdgeR.txt 2 0.05 EdgeR GeneBody'_'120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15
[1] "Print arguments:"
[1] "-----------------"
[1] "Differential expression_Output:"
[1] "120Inf_KO_LZ_M27M28M29M30_vs_NoInf_WT_LZ_M13M14M15_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_M27M28M29M30_NoInf_WT_LZ_M13M14M15"
[1] "-----------------"
[1] "Differential Gene Counts"
[1] "Number of significant differential genes with positive fold change (Up Genes):"
[1] 77  7
[1] "Number of significant differential genes with negative fold change (Down Genes):"
[1] 65  7
[1] "Check out Up_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt!"
[1] "Check out Down_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt!"
#----------------------------------------------------------------------------------
Running Venn_Diff_Genes.R
#----------------------------------------------------------------------------------
Printing Rscript command:
#----------------------------------------------------------------------------------
Rscript Venn_Diff_Genes.R Down_Genes_DESeq_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt Down_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt GeneBody_Counting DiffExp_7a
[1] "Print arguments:"
[1] "-----------------"
[1] "File1:"
[1] "Down_Genes_DESeq_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt"
[1] "File2:"
[1] "Down_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt"
[1] "Subtitle:"
[1] "GeneBody_Counting"
[1] "DiffExp_Index:"
[1] "DiffExp_7a"
[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_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt Up_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt GeneBody_Counting DiffExp_7a
[1] "Print arguments:"
[1] "-----------------"
[1] "File1:"
[1] "Up_Genes_DESeq_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt"
[1] "File2:"
[1] "Up_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt"
[1] "Subtitle:"
[1] "GeneBody_Counting"
[1] "DiffExp_Index:"
[1] "DiffExp_7a"
[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  248035 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO0.out
-rw-r--r-- 1 kkarri waxmanlab       9 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO0_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab  246689 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO1.out
-rw-r--r-- 1 kkarri waxmanlab       9 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO1_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab  246791 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO2.out
-rw-r--r-- 1 kkarri waxmanlab       9 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO2_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab  245838 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO3.out
-rw-r--r-- 1 kkarri waxmanlab       9 May 14 12:45 /scratch/6187919.1.linga/Input/120Inf_KO3_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 3564011 May 14 12:48 /scratch/6187919.1.linga/Input/120Inf_KO_LZ_M27M28M29M30_vs_NoInf_WT_LZ_M13M14M15_DiffExp_v2_GeneBody_forSEGEXUpload_DESeq.txt
-rw-r--r-- 1 kkarri waxmanlab 3515617 May 14 12:48 /scratch/6187919.1.linga/Input/120Inf_KO_LZ_M27M28M29M30_vs_NoInf_WT_LZ_M13M14M15_DiffExp_v2_GeneBody_forSEGEXUpload_EdgeR.txt
-rw-r--r-- 1 kkarri waxmanlab     290 May 14 12:48 /scratch/6187919.1.linga/Input/DiffExp_7a_Venn_Tables_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt
-rw-r--r-- 1 kkarri waxmanlab 8591853 May 14 12:47 /scratch/6187919.1.linga/Input/DiffExp_v2_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt
-rwxr-xr-x 1 kkarri waxmanlab    7394 May 14 12:44 /scratch/6187919.1.linga/Input/Diff_Genes.R
-rw-r--r-- 1 kkarri waxmanlab    1118 May 14 12:48 /scratch/6187919.1.linga/Input/Down_Genes_DESeq_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt
-rw-r--r-- 1 kkarri waxmanlab    6095 May 14 12:48 /scratch/6187919.1.linga/Input/Down_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt
-rw-r--r-- 1 kkarri waxmanlab  291522 May 14 12:45 /scratch/6187919.1.linga/Input/Exon_Regions_Lengths.txt
-rw-r--r-- 1 kkarri waxmanlab  248221 May 14 12:45 /scratch/6187919.1.linga/Input/NoInf_WT0.out
-rw-r--r-- 1 kkarri waxmanlab       9 May 14 12:44 /scratch/6187919.1.linga/Input/NoInf_WT0_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab  247724 May 14 12:45 /scratch/6187919.1.linga/Input/NoInf_WT1.out
-rw-r--r-- 1 kkarri waxmanlab       9 May 14 12:44 /scratch/6187919.1.linga/Input/NoInf_WT1_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab  246958 May 14 12:45 /scratch/6187919.1.linga/Input/NoInf_WT2.out
-rw-r--r-- 1 kkarri waxmanlab       9 May 14 12:44 /scratch/6187919.1.linga/Input/NoInf_WT2_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab    1420 May 14 12:48 /scratch/6187919.1.linga/Input/Up_Genes_DESeq_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt
-rw-r--r-- 1 kkarri waxmanlab    9062 May 14 12:48 /scratch/6187919.1.linga/Input/Up_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15.txt
-rwxr-xr-x 1 kkarri waxmanlab    9553 May 14 12:44 /scratch/6187919.1.linga/Input/Venn_Diff_Genes.R
-rw-r--r-- 1 kkarri waxmanlab   35824 May 14 12:48 /scratch/6187919.1.linga/Input/Venn_Down.DESeq.GeneBody.HTSeq.Down.EdgeR.GeneBody.HTSeq.png
-rw-r--r-- 1 kkarri waxmanlab   33531 May 14 12:48 /scratch/6187919.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/6187919.1.linga/Input/formatForSegex_ver3.R

/scratch/6187919.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:48 ..

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

List files in scratch

total 72M
drwx------   3 kkarri waxmanlab 4.0K May 14 12:48 .
drwxrwxrwt. 64 root   root       84K 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:48 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 13M
drwxr-sr-x 2 kkarri waxmanlab  32K May 14 12:48 .
drwxr-sr-x 7 kkarri waxmanlab  32K May 14 12:46 ..
-rw-r--r-- 1 kkarri waxmanlab 3.4M May 14 12:48 120Inf_KO_LZ_M27M28M29M30_vs_NoInf_WT_LZ_M13M14M15_DiffExp_v2_GeneBody_forSEGEXUpload_DESeq_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab 3.4M May 14 12:48 120Inf_KO_LZ_M27M28M29M30_vs_NoInf_WT_LZ_M13M14M15_DiffExp_v2_GeneBody_forSEGEXUpload_EdgeR_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab  290 May 14 12:48 DiffExp_7a_Venn_Tables_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab 8.2M May 14 12:48 DiffExp_v2_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab 1.1K May 14 12:48 Down_Genes_DESeq_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab 6.0K May 14 12:48 Down_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab 1.4K May 14 12:48 Up_Genes_DESeq_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab 8.9K May 14 12:48 Up_Genes_EdgeR_GeneBody_120Inf_KO_LZ_M27M28M29M30_NoInf_WT_LZ_M13M14M15_HTSeq.txt
-rw-r--r-- 1 kkarri waxmanlab  35K May 14 12:48 Venn_Down.DESeq.GeneBody.HTSeq.Down.EdgeR.GeneBody.HTSeq_HTSeq.png
-rw-r--r-- 1 kkarri waxmanlab  33K May 14 12:48 Venn_Up.DESeq.GeneBody.HTSeq.Up.EdgeR.GeneBody.HTSeq_HTSeq.png
==========================================================
==========================================================
Finished on : Mon May 14 12:48:08 EDT 2018
3 minutes and 10 seconds elapsed.
==========================================================
