-----------------------
Need shift 5 command (have more than 9 arguments):
-----------------------
-----------------------
Start of variable list:
-----------------------
SCRIPT_DIR:
/net/waxman-server/mnt/data/waxmanlabvm_home/kkarri/G170/Scripts/09b_DiffExp_5_featureCounts
Dataset_DIR:
/net/waxman-server/mnt/data/waxmanlabvm_home/kkarri/G170
Dataset_Label:
G170
GTF_Files_DIR:
/unprotected/projects/waxmanlab/routines/GTF_Files
ANNOTATION_FILE:
RefSeq_GeneBody.gtf
CONDITION_1_NAME:
F_Placebo_TD229
CONDITION_2_NAME:
F_CPA_1D_TD229
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:
featureCounts
-----------------------
End of variable list
-----------------------
==========================================================
Starting on : Mon Sep 16 10:17:20 EDT 2019
Running on node : scc-kb2
Current directory : /net/waxman-server/mnt/data/waxmanlabvm_home/kkarri/G170/Scripts/09b_DiffExp_5_featureCounts
Current job ID : 9373333
Current job name : Step_09b_DiffExp_5a
Task index number : undefined
Parameter for multiple cores : 1
==========================================================

Change dir to scratch directory


Print scratch directory location:

/scratch/9373333.1.linga

Loading required modules...

------------------------------------------
Sample_DIR:
G170_M20
Sample_ID:
G170_M20
Description:
F_Placebo1_TD229
M_Num:
M20
Copy Condition_1 sample count files to Condition_1 folder
calculate mapped reads: G170_M20
Sample_DIR:
G170_M21
Sample_ID:
G170_M21
Description:
F_Placebo2_TD229
M_Num:
M21
Copy Condition_1 sample count files to Condition_1 folder
calculate mapped reads: G170_M21
M_Num_Cond1_List:
M20M21
------------------------------------------
------------------------------------------
Sample_DIR:
G170_M22
Sample_ID:
G170_M22
Description:
F_CPA_1D3_TD229
M_Num:
M22
Copy Condition_2 sample count files to Condition_2 folder
calculate mapped reads: G170_M22
Sample_DIR:
G170_M23
Sample_ID:
G170_M23
Description:
F_CPA_1D4_TD229
M_Num:
M23
Copy Condition_2 sample count files to Condition_2 folder
calculate mapped reads: G170_M23
M_Num_Cond2_List:
M22M23
------------------------------------------
==========================================================

Number of replicates in each condition:

NUM_REP_CONDITION1: 2
NUM_REP_CONDITION1: 2
==========================================================

Renaming input count files

Counting program: Not HTSeq
No lines removed.
Counting program: Not HTSeq
No lines removed.
Counting program: Not HTSeq
No lines removed.
Counting program: Not HTSeq
No lines removed.
number of mapped reads
44274385
46414557
44524767
45401633
==========================================================

List files in Input

-rw-r--r-- 1 kkarri waxmanlab 291522 Sep 16 10:17 /scratch/9373333.1.linga/Input/Exon_Regions_Lengths.txt
-rw-r--r-- 1 kkarri waxmanlab 253448 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_CPA_1D_TD2290.out
-rw-r--r-- 1 kkarri waxmanlab      9 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_CPA_1D_TD2290_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 254021 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_CPA_1D_TD2291.out
-rw-r--r-- 1 kkarri waxmanlab      9 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_CPA_1D_TD2291_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 252909 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_Placebo_TD2290.out
-rw-r--r-- 1 kkarri waxmanlab      9 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_Placebo_TD2290_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 253556 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_Placebo_TD2291.out
-rw-r--r-- 1 kkarri waxmanlab      9 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_Placebo_TD2291_num_mapped_reads.txt

/scratch/9373333.1.linga/Input/F_CPA_1D_TD229:
total 8
drwxr-xr-x 2 kkarri waxmanlab 4096 Sep 16 10:17 .
drwxr-xr-x 4 kkarri waxmanlab 4096 Sep 16 10:17 ..

/scratch/9373333.1.linga/Input/F_Placebo_TD229:
total 8
drwxr-xr-x 2 kkarri waxmanlab 4096 Sep 16 10:17 .
drwxr-xr-x 4 kkarri waxmanlab 4096 Sep 16 10:17 ..
==========================================================

Starting to run my commands

Printing Rscript command:
Rscript differentialAnalysis.R F_Placebo_TD229 F_CPA_1D_TD229 2 2 RefSeq_GeneBody.gtf /scratch/9373333.1.linga/Input DiffExp_v2_GeneBody Exon_Regions_Lengths.txt
[1] "Arguments for differentialAnalysisDESeq.R:"
[1] "F_Placebo_TD229"
[1] "F_CPA_1D_TD229"
[1] 2
[1] 2
[1] "RefSeq_GeneBody.gtf"
[1] "/scratch/9373333.1.linga/Input"
[1] "DiffExp_v2_GeneBody"
[1] "Exon_Regions_Lengths.txt"
[1] "sum1:287182.057180504" "sum1:252675.815460196" "sum1:269928.93632035" 
[1] "sum2:254458.180876955" "sum2:238457.623518738" "sum2:246457.902197847"
load GTF file ... 
parse attributes ... 
[1] "output file is in: /scratch/9373333.1.linga/Input/DiffExp_v2_GeneBody_F_Placebo_TD229_F_CPA_1D_TD229.txt"
==========================================================

Create SEGEX formatted file:

Printing Rscript command:
Rscript formatForSegex_ver3.R  DiffExp_v2_GeneBody_F_Placebo_TD229_F_CPA_1D_TD229.txt F_CPA_1D_TD229_G170_M22M23_vs_F_Placebo_TD229_G170_M20M21_DiffExp_v2_GeneBody_forSEGEXUpload 1 GeneBody
Printing Rscript command:
Rscript formatForSegex_ver4.R  DiffExp_v2_GeneBody_F_Placebo_TD229_F_CPA_1D_TD229.txt F_CPA_1D_TD229_G170_M22M23_vs_F_Placebo_TD229_G170_M20M21_DiffExp_v2_GeneBody_forSEGEXUpload 1 GeneBody
==========================================================
Comparison_Info:
F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21
#----------------------------------------------------------------------------------
Running Diff_Genes.R
#----------------------------------------------------------------------------------
Printing Rscript command:
Rscript Diff_Genes.R F_CPA_1D_TD229_G170_M22M23_vs_F_Placebo_TD229_G170_M20M21_DiffExp_v2_GeneBody_forSEGEXUpload_DESeq.txt 2 0.05 DESeq GeneBody'_'F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21
[1] "Print arguments:"
[1] "-----------------"
[1] "Differential expression_Output:"
[1] "F_CPA_1D_TD229_G170_M22M23_vs_F_Placebo_TD229_G170_M20M21_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_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21"
[1] "-----------------"
[1] "Differential Gene Counts"
[1] "Number of significant differential genes with positive fold change (Up Genes):"
[1] 0 7
[1] "Number of significant differential genes with negative fold change (Down Genes):"
[1] 7 7
[1] "Check out Up_Genes_DESeq_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.txt!"
[1] "Check out Down_Genes_DESeq_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.txt!"
Rscript Diff_Genes.R F_CPA_1D_TD229_G170_M22M23_vs_F_Placebo_TD229_G170_M20M21_DiffExp_v2_GeneBody_forSEGEXUpload_EdgeR.txt 2 0.05 EdgeR GeneBody'_'F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21
[1] "Print arguments:"
[1] "-----------------"
[1] "Differential expression_Output:"
[1] "F_CPA_1D_TD229_G170_M22M23_vs_F_Placebo_TD229_G170_M20M21_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_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21"
[1] "-----------------"
[1] "Differential Gene Counts"
[1] "Number of significant differential genes with positive fold change (Up Genes):"
[1] 2 7
[1] "Number of significant differential genes with negative fold change (Down Genes):"
[1] 11  7
[1] "Check out Up_Genes_EdgeR_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.txt!"
[1] "Check out Down_Genes_EdgeR_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.txt!"
#----------------------------------------------------------------------------------
Running Venn_Diff_Genes.R
#----------------------------------------------------------------------------------
Printing Rscript command:
#----------------------------------------------------------------------------------
Rscript Venn_Diff_Genes.R Down_Genes_DESeq_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.txt Down_Genes_EdgeR_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.txt GeneBody_Counting DiffExp_5a
[1] "Print arguments:"
[1] "-----------------"
[1] "File1:"
[1] "Down_Genes_DESeq_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.txt"
[1] "File2:"
[1] "Down_Genes_EdgeR_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.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_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.txt Up_Genes_EdgeR_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.txt GeneBody_Counting DiffExp_5a
[1] "Print arguments:"
[1] "-----------------"
[1] "File1:"
[1] "Up_Genes_DESeq_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.txt"
[1] "File2:"
[1] "Up_Genes_EdgeR_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.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
#----------------------------------------------------------------------------------
Comparison_Info:
F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21
#----------------------------------------------------------------------------------
==========================================================
Renaming the Differential_Expression_File
==========================================================

List files in Input

-rw-r--r-- 1 kkarri waxmanlab     285 Sep 16 10:19 /scratch/9373333.1.linga/Input/DiffExp_5a_Venn_Tables_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.txt
-rw-r--r-- 1 kkarri waxmanlab 9102684 Sep 16 10:18 /scratch/9373333.1.linga/Input/DiffExp_v2_GeneBody_F_Placebo_TD229_F_CPA_1D_TD229.txt
-rwxr-xr-x 1 kkarri waxmanlab    7394 Sep 16 10:17 /scratch/9373333.1.linga/Input/Diff_Genes.R
-rw-r--r-- 1 kkarri waxmanlab     805 Sep 16 10:19 /scratch/9373333.1.linga/Input/Down_Genes_DESeq_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.txt
-rw-r--r-- 1 kkarri waxmanlab    1332 Sep 16 10:19 /scratch/9373333.1.linga/Input/Down_Genes_EdgeR_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.txt
-rw-r--r-- 1 kkarri waxmanlab  291522 Sep 16 10:17 /scratch/9373333.1.linga/Input/Exon_Regions_Lengths.txt
-rw-r--r-- 1 kkarri waxmanlab  253448 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_CPA_1D_TD2290.out
-rw-r--r-- 1 kkarri waxmanlab       9 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_CPA_1D_TD2290_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab  254021 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_CPA_1D_TD2291.out
-rw-r--r-- 1 kkarri waxmanlab       9 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_CPA_1D_TD2291_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 3104280 Sep 16 10:18 /scratch/9373333.1.linga/Input/F_CPA_1D_TD229_G170_M22M23_vs_F_Placebo_TD229_G170_M20M21_DiffExp_v2_GeneBody_forSEGEXUpload_DESeq.txt
-rw-r--r-- 1 kkarri waxmanlab 3346250 Sep 16 10:18 /scratch/9373333.1.linga/Input/F_CPA_1D_TD229_G170_M22M23_vs_F_Placebo_TD229_G170_M20M21_DiffExp_v2_GeneBody_forSEGEXUpload_EdgeR.txt
-rw-r--r-- 1 kkarri waxmanlab 3104278 Sep 16 10:19 /scratch/9373333.1.linga/Input/F_CPA_1D_TD229_G170_M22M23_vs_F_Placebo_TD229_G170_M20M21_DiffExp_v2_GeneBody_forSEGEXUpload_TPM_DESeq.txt
-rw-r--r-- 1 kkarri waxmanlab 3346248 Sep 16 10:19 /scratch/9373333.1.linga/Input/F_CPA_1D_TD229_G170_M22M23_vs_F_Placebo_TD229_G170_M20M21_DiffExp_v2_GeneBody_forSEGEXUpload_TPM_EdgeR.txt
-rw-r--r-- 1 kkarri waxmanlab  252909 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_Placebo_TD2290.out
-rw-r--r-- 1 kkarri waxmanlab       9 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_Placebo_TD2290_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab  253556 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_Placebo_TD2291.out
-rw-r--r-- 1 kkarri waxmanlab       9 Sep 16 10:17 /scratch/9373333.1.linga/Input/F_Placebo_TD2291_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab     154 Sep 16 10:19 /scratch/9373333.1.linga/Input/Up_Genes_DESeq_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.txt
-rw-r--r-- 1 kkarri waxmanlab     268 Sep 16 10:19 /scratch/9373333.1.linga/Input/Up_Genes_EdgeR_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21.txt
-rwxr-xr-x 1 kkarri waxmanlab    9553 Sep 16 10:17 /scratch/9373333.1.linga/Input/Venn_Diff_Genes.R
-rw-r--r-- 1 kkarri waxmanlab   40546 Sep 16 10:19 /scratch/9373333.1.linga/Input/Venn_Down.DESeq.GeneBody.HTSeq.Down.EdgeR.GeneBody.HTSeq.png
-rw-r--r-- 1 kkarri waxmanlab   30287 Sep 16 10:19 /scratch/9373333.1.linga/Input/Venn_Up.DESeq.GeneBody.HTSeq.Up.EdgeR.GeneBody.HTSeq.png
-rwxr-xr-x 1 kkarri waxmanlab    3925 Sep 16 10:17 /scratch/9373333.1.linga/Input/formatForSegex_ver3.R
-rwxr-xr-x 1 kkarri waxmanlab    3929 Sep 16 10:17 /scratch/9373333.1.linga/Input/formatForSegex_ver4.R

/scratch/9373333.1.linga/Input/F_CPA_1D_TD229:
total 8
drwxr-xr-x 2 kkarri waxmanlab 4096 Sep 16 10:17 .
drwxr-xr-x 4 kkarri waxmanlab 4096 Sep 16 10:19 ..

/scratch/9373333.1.linga/Input/F_Placebo_TD229:
total 8
drwxr-xr-x 2 kkarri waxmanlab 4096 Sep 16 10:17 .
drwxr-xr-x 4 kkarri waxmanlab 4096 Sep 16 10:19 ..
==========================================================

List files in scratch

total 72M
drwx------   3 kkarri waxmanlab 4.0K Sep 16 10:19 .
drwxrwxrwt. 18 root   root      4.0K Sep 16 10:17 ..
-rw-r--r--   1 kkarri waxmanlab  103 Sep 16 10:17 Condition_1.txt
-rw-r--r--   1 kkarri waxmanlab  101 Sep 16 10:17 Condition_2.txt
drwxr-xr-x   4 kkarri waxmanlab 4.0K Sep 16 10:19 Input
-rw-r--r--   1 kkarri waxmanlab  72M Sep 16 10:17 RefSeq_GeneBody.gtf
-rwxr-xr-x   1 kkarri waxmanlab  17K Sep 16 10:17 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 30M
drwxr-xr-x 2 kkarri waxmanlab 4.0K Sep 16 10:13 .
drwxr-xr-x 6 kkarri waxmanlab 4.0K Sep 16 10:11 ..
-rw-r--r-- 1 kkarri waxmanlab  285 Sep 16 10:13 DiffExp_5a_Venn_Tables_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab 8.7M Sep 16 10:13 DiffExp_v2_GeneBody_F_Placebo_TD229_F_CPA_1D_TD229_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab  805 Sep 16 10:13 Down_Genes_DESeq_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab 1.4K Sep 16 10:13 Down_Genes_EdgeR_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab 3.0M Sep 16 10:13 F_CPA_1D_TD229_G170_M22M23_vs_F_Placebo_TD229_G170_M20M21_DiffExp_v2_GeneBody_forSEGEXUpload_DESeq_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab 3.2M Sep 16 10:13 F_CPA_1D_TD229_G170_M22M23_vs_F_Placebo_TD229_G170_M20M21_DiffExp_v2_GeneBody_forSEGEXUpload_EdgeR_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab 3.0M Sep 16 10:13 F_CPA_1D_TD229_G170_M22M23_vs_F_Placebo_TD229_G170_M20M21_DiffExp_v2_GeneBody_forSEGEXUpload_TPM_DESeq_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab 3.2M Sep 16 10:13 F_CPA_1D_TD229_G170_M22M23_vs_F_Placebo_TD229_G170_M20M21_DiffExp_v2_GeneBody_forSEGEXUpload_TPM_EdgeR_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab  154 Sep 16 10:13 Up_Genes_DESeq_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab  268 Sep 16 10:13 Up_Genes_EdgeR_GeneBody_F_CPA_1D_TD229_G170_M22M23_F_Placebo_TD229_G170_M20M21_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab  40K Sep 16 10:13 Venn_Down.DESeq.GeneBody.HTSeq.Down.EdgeR.GeneBody.HTSeq_featureCounts.png
-rw-r--r-- 1 kkarri waxmanlab  30K Sep 16 10:13 Venn_Up.DESeq.GeneBody.HTSeq.Up.EdgeR.GeneBody.HTSeq_featureCounts.png
==========================================================
==========================================================
Finished on : Mon Sep 16 10:19:08 EDT 2019
1 minutes and 48 seconds elapsed.
==========================================================
