-----------------------
Need shift 5 command (have more than 9 arguments):
-----------------------
-----------------------
Start of variable list:
-----------------------
SCRIPT_DIR:
/net/waxman-server/mnt/data/waxmanlabvm_home/kkarri/Dana/Scripts/08b_DiffExp_8_featureCounts
Dataset_DIR:
/net/waxman-server/mnt/data/waxmanlabvm_home/kkarri/Dana
Dataset_Label:
GSE118757
GTF_Files_DIR:
/unprotected/projects/waxmanlab/routines/GTF_Files
ANNOTATION_FILE:
RefSeq_GeneBody.gtf
CONDITION_1_NAME:
WTF
CONDITION_2_NAME:
M2WTF
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_8a
COL_SUFFIX:
GeneBody
COUNT_PROGRAM:
featureCounts
-----------------------
End of variable list
-----------------------
==========================================================
Starting on : Tue Mar 10 14:01:37 EDT 2020
Running on node : scc-ka1
Current directory : /net/waxman-server/mnt/data/waxmanlabvm_home/kkarri/Dana/Scripts/08b_DiffExp_8_featureCounts
Current job ID : 3784366
Current job name : Step_08b_DiffExp_8a
Task index number : undefined
Parameter for multiple cores : 1
==========================================================

Change dir to scratch directory


Print scratch directory location:

/scratch/3784366.1.linga

Loading required modules...

------------------------------------------
Sample_DIR:
WTF_1
Sample_ID:
WTF_1
Description:
WTF_1
M_Num:
1
Copy Condition_1 sample count files to Condition_1 folder
calculate mapped reads: WTF_1
Sample_DIR:
WTF_2
Sample_ID:
WTF_2
Description:
WTF_2
M_Num:
2
Copy Condition_1 sample count files to Condition_1 folder
calculate mapped reads: WTF_2
M_Num_Cond1_List:
12
------------------------------------------
------------------------------------------
Sample_DIR:
M2WTF_1
Sample_ID:
M2WTF_1
Description:
M2WTF_1
M_Num:
1
Copy Condition_2 sample count files to Condition_2 folder
calculate mapped reads: M2WTF_1
Sample_DIR:
M2WTF_2
Sample_ID:
M2WTF_2
Description:
M2WTF_2
M_Num:
2
Copy Condition_2 sample count files to Condition_2 folder
calculate mapped reads: M2WTF_2
M_Num_Cond2_List:
12
------------------------------------------
==========================================================

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
20201329
19640168
23876814
22256053
==========================================================

List files in Input

-rw-r--r-- 1 kkarri waxmanlab 291522 Mar 10 14:01 /scratch/3784366.1.linga/Input/Exon_Regions_Lengths.txt
-rw-r--r-- 1 kkarri waxmanlab 245835 Mar 10 14:01 /scratch/3784366.1.linga/Input/M2WTF0.out
-rw-r--r-- 1 kkarri waxmanlab      9 Mar 10 14:01 /scratch/3784366.1.linga/Input/M2WTF0_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 246100 Mar 10 14:01 /scratch/3784366.1.linga/Input/M2WTF1.out
-rw-r--r-- 1 kkarri waxmanlab      9 Mar 10 14:01 /scratch/3784366.1.linga/Input/M2WTF1_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 247145 Mar 10 14:01 /scratch/3784366.1.linga/Input/WTF0.out
-rw-r--r-- 1 kkarri waxmanlab      9 Mar 10 14:01 /scratch/3784366.1.linga/Input/WTF0_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 247088 Mar 10 14:01 /scratch/3784366.1.linga/Input/WTF1.out
-rw-r--r-- 1 kkarri waxmanlab      9 Mar 10 14:01 /scratch/3784366.1.linga/Input/WTF1_num_mapped_reads.txt

/scratch/3784366.1.linga/Input/M2WTF:
total 8
drwxr-xr-x 2 kkarri waxmanlab 4096 Mar 10 14:01 .
drwxr-xr-x 4 kkarri waxmanlab 4096 Mar 10 14:01 ..

/scratch/3784366.1.linga/Input/WTF:
total 8
drwxr-xr-x 2 kkarri waxmanlab 4096 Mar 10 14:01 .
drwxr-xr-x 4 kkarri waxmanlab 4096 Mar 10 14:01 ..
==========================================================

Starting to run my commands

Printing Rscript command:
Rscript differentialAnalysis.R WTF M2WTF 2 2 RefSeq_GeneBody.gtf /scratch/3784366.1.linga/Input DiffExp_v2_GeneBody Exon_Regions_Lengths.txt
[1] "Arguments for differentialAnalysisDESeq.R:"
[1] "WTF"
[1] "M2WTF"
[1] 2
[1] 2
[1] "RefSeq_GeneBody.gtf"
[1] "/scratch/3784366.1.linga/Input"
[1] "DiffExp_v2_GeneBody"
[1] "Exon_Regions_Lengths.txt"
[1] "sum1:351145.596385052" "sum1:358874.149301195" "sum1:355009.872843123"
[1] "sum2:325229.563142074" "sum2:341324.793864805" "sum2:333277.178503439"
load GTF file ... 
parse attributes ... 
[1] "output file is in: /scratch/3784366.1.linga/Input/DiffExp_v2_GeneBody_WTF_M2WTF.txt"
==========================================================

Create SEGEX formatted file:

Printing Rscript command:
Rscript formatForSegex_ver3.R  DiffExp_v2_GeneBody_WTF_M2WTF.txt M2WTF_GSE118757_12_vs_WTF_GSE118757_12_DiffExp_v2_GeneBody_forSEGEXUpload 1 GeneBody
Printing Rscript command:
Rscript formatForSegex_ver4.R  DiffExp_v2_GeneBody_WTF_M2WTF.txt M2WTF_GSE118757_12_vs_WTF_GSE118757_12_DiffExp_v2_GeneBody_forSEGEXUpload 1 GeneBody
==========================================================
Comparison_Info:
M2WTF_GSE118757_12_WTF_GSE118757_12
#----------------------------------------------------------------------------------
Running Diff_Genes.R
#----------------------------------------------------------------------------------
Printing Rscript command:
Rscript Diff_Genes.R M2WTF_GSE118757_12_vs_WTF_GSE118757_12_DiffExp_v2_GeneBody_forSEGEXUpload_DESeq.txt 2 0.05 DESeq GeneBody'_'M2WTF_GSE118757_12_WTF_GSE118757_12
[1] "Print arguments:"
[1] "-----------------"
[1] "Differential expression_Output:"
[1] "M2WTF_GSE118757_12_vs_WTF_GSE118757_12_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_M2WTF_GSE118757_12_WTF_GSE118757_12"
[1] "-----------------"
[1] "Differential Gene Counts"
[1] "Number of significant differential genes with positive fold change (Up Genes):"
[1] 1503    7
[1] "Number of significant differential genes with negative fold change (Down Genes):"
[1] 1293    7
[1] "Check out Up_Genes_DESeq_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12.txt!"
[1] "Check out Down_Genes_DESeq_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12.txt!"
Rscript Diff_Genes.R M2WTF_GSE118757_12_vs_WTF_GSE118757_12_DiffExp_v2_GeneBody_forSEGEXUpload_EdgeR.txt 2 0.05 EdgeR GeneBody'_'M2WTF_GSE118757_12_WTF_GSE118757_12
[1] "Print arguments:"
[1] "-----------------"
[1] "Differential expression_Output:"
[1] "M2WTF_GSE118757_12_vs_WTF_GSE118757_12_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_M2WTF_GSE118757_12_WTF_GSE118757_12"
[1] "-----------------"
[1] "Differential Gene Counts"
[1] "Number of significant differential genes with positive fold change (Up Genes):"
[1] 1675    7
[1] "Number of significant differential genes with negative fold change (Down Genes):"
[1] 1811    7
[1] "Check out Up_Genes_EdgeR_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12.txt!"
[1] "Check out Down_Genes_EdgeR_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12.txt!"
#----------------------------------------------------------------------------------
Running Venn_Diff_Genes.R
#----------------------------------------------------------------------------------
Printing Rscript command:
#----------------------------------------------------------------------------------
Rscript Venn_Diff_Genes.R Down_Genes_DESeq_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12.txt Down_Genes_EdgeR_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12.txt GeneBody_Counting DiffExp_8a
[1] "Print arguments:"
[1] "-----------------"
[1] "File1:"
[1] "Down_Genes_DESeq_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12.txt"
[1] "File2:"
[1] "Down_Genes_EdgeR_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12.txt"
[1] "Subtitle:"
[1] "GeneBody_Counting"
[1] "DiffExp_Index:"
[1] "DiffExp_8a"
[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_M2WTF_GSE118757_12_WTF_GSE118757_12.txt Up_Genes_EdgeR_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12.txt GeneBody_Counting DiffExp_8a
[1] "Print arguments:"
[1] "-----------------"
[1] "File1:"
[1] "Up_Genes_DESeq_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12.txt"
[1] "File2:"
[1] "Up_Genes_EdgeR_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12.txt"
[1] "Subtitle:"
[1] "GeneBody_Counting"
[1] "DiffExp_Index:"
[1] "DiffExp_8a"
[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     300 Mar 10 14:03 /scratch/3784366.1.linga/Input/DiffExp_8a_Venn_Tables_M2WTF_GSE118757_12_WTF_GSE118757_12.txt
-rw-r--r-- 1 kkarri waxmanlab 9125651 Mar 10 14:02 /scratch/3784366.1.linga/Input/DiffExp_v2_GeneBody_WTF_M2WTF.txt
-rwxr-xr-x 1 kkarri waxmanlab    7394 Mar 10 14:01 /scratch/3784366.1.linga/Input/Diff_Genes.R
-rw-r--r-- 1 kkarri waxmanlab  105603 Mar 10 14:03 /scratch/3784366.1.linga/Input/Down_Genes_DESeq_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12.txt
-rw-r--r-- 1 kkarri waxmanlab  147907 Mar 10 14:03 /scratch/3784366.1.linga/Input/Down_Genes_EdgeR_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12.txt
-rw-r--r-- 1 kkarri waxmanlab  291522 Mar 10 14:01 /scratch/3784366.1.linga/Input/Exon_Regions_Lengths.txt
-rw-r--r-- 1 kkarri waxmanlab  245835 Mar 10 14:01 /scratch/3784366.1.linga/Input/M2WTF0.out
-rw-r--r-- 1 kkarri waxmanlab       9 Mar 10 14:01 /scratch/3784366.1.linga/Input/M2WTF0_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab  246100 Mar 10 14:01 /scratch/3784366.1.linga/Input/M2WTF1.out
-rw-r--r-- 1 kkarri waxmanlab       9 Mar 10 14:01 /scratch/3784366.1.linga/Input/M2WTF1_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab 2547728 Mar 10 14:02 /scratch/3784366.1.linga/Input/M2WTF_GSE118757_12_vs_WTF_GSE118757_12_DiffExp_v2_GeneBody_forSEGEXUpload_DESeq.txt
-rw-r--r-- 1 kkarri waxmanlab 2571925 Mar 10 14:02 /scratch/3784366.1.linga/Input/M2WTF_GSE118757_12_vs_WTF_GSE118757_12_DiffExp_v2_GeneBody_forSEGEXUpload_EdgeR.txt
-rw-r--r-- 1 kkarri waxmanlab 2571923 Mar 10 14:02 /scratch/3784366.1.linga/Input/M2WTF_GSE118757_12_vs_WTF_GSE118757_12_DiffExp_v2_GeneBody_forSEGEXUpload_TPM_DESeq.txt
-rw-r--r-- 1 kkarri waxmanlab 2596120 Mar 10 14:03 /scratch/3784366.1.linga/Input/M2WTF_GSE118757_12_vs_WTF_GSE118757_12_DiffExp_v2_GeneBody_forSEGEXUpload_TPM_EdgeR.txt
-rw-r--r-- 1 kkarri waxmanlab  115426 Mar 10 14:03 /scratch/3784366.1.linga/Input/Up_Genes_DESeq_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12.txt
-rw-r--r-- 1 kkarri waxmanlab  130422 Mar 10 14:03 /scratch/3784366.1.linga/Input/Up_Genes_EdgeR_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12.txt
-rwxr-xr-x 1 kkarri waxmanlab    9553 Mar 10 14:01 /scratch/3784366.1.linga/Input/Venn_Diff_Genes.R
-rw-r--r-- 1 kkarri waxmanlab   42277 Mar 10 14:03 /scratch/3784366.1.linga/Input/Venn_Down.DESeq.GeneBody.HTSeq.Down.EdgeR.GeneBody.HTSeq.png
-rw-r--r-- 1 kkarri waxmanlab   42427 Mar 10 14:03 /scratch/3784366.1.linga/Input/Venn_Up.DESeq.GeneBody.HTSeq.Up.EdgeR.GeneBody.HTSeq.png
-rw-r--r-- 1 kkarri waxmanlab  247145 Mar 10 14:01 /scratch/3784366.1.linga/Input/WTF0.out
-rw-r--r-- 1 kkarri waxmanlab       9 Mar 10 14:01 /scratch/3784366.1.linga/Input/WTF0_num_mapped_reads.txt
-rw-r--r-- 1 kkarri waxmanlab  247088 Mar 10 14:01 /scratch/3784366.1.linga/Input/WTF1.out
-rw-r--r-- 1 kkarri waxmanlab       9 Mar 10 14:01 /scratch/3784366.1.linga/Input/WTF1_num_mapped_reads.txt
-rwxr-xr-x 1 kkarri waxmanlab    3925 Mar 10 14:01 /scratch/3784366.1.linga/Input/formatForSegex_ver3.R
-rwxr-xr-x 1 kkarri waxmanlab    3929 Mar 10 14:01 /scratch/3784366.1.linga/Input/formatForSegex_ver4.R

/scratch/3784366.1.linga/Input/M2WTF:
total 8
drwxr-xr-x 2 kkarri waxmanlab 4096 Mar 10 14:01 .
drwxr-xr-x 4 kkarri waxmanlab 4096 Mar 10 14:03 ..

/scratch/3784366.1.linga/Input/WTF:
total 8
drwxr-xr-x 2 kkarri waxmanlab 4096 Mar 10 14:01 .
drwxr-xr-x 4 kkarri waxmanlab 4096 Mar 10 14:03 ..
==========================================================

List files in scratch

total 72M
drwx------   3 kkarri waxmanlab 4.0K Mar 10 14:03 .
drwxrwxrwt. 41 root   root       12K Mar 10 14:02 ..
-rw-r--r--   1 kkarri waxmanlab   69 Mar 10 14:01 Condition_1.txt
-rw-r--r--   1 kkarri waxmanlab   81 Mar 10 14:01 Condition_2.txt
drwxr-xr-x   4 kkarri waxmanlab 4.0K Mar 10 14:03 Input
-rw-r--r--   1 kkarri waxmanlab  72M Mar 10 14:01 RefSeq_GeneBody.gtf
-rwxr-xr-x   1 kkarri waxmanlab  17K Mar 10 14:01 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 Mar 10 13:55 .
drwxr-xr-x 7 kkarri waxmanlab 4.0K Mar 10 13:54 ..
-rw-r--r-- 1 kkarri waxmanlab  300 Mar 10 13:55 DiffExp_8a_Venn_Tables_M2WTF_GSE118757_12_WTF_GSE118757_12_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab 8.8M Mar 10 13:55 DiffExp_v2_GeneBody_WTF_M2WTF_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab 104K Mar 10 13:55 Down_Genes_DESeq_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab 145K Mar 10 13:55 Down_Genes_EdgeR_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab 2.5M Mar 10 13:55 M2WTF_GSE118757_12_vs_WTF_GSE118757_12_DiffExp_v2_GeneBody_forSEGEXUpload_DESeq_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab 2.5M Mar 10 13:55 M2WTF_GSE118757_12_vs_WTF_GSE118757_12_DiffExp_v2_GeneBody_forSEGEXUpload_EdgeR_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab 2.5M Mar 10 13:55 M2WTF_GSE118757_12_vs_WTF_GSE118757_12_DiffExp_v2_GeneBody_forSEGEXUpload_TPM_DESeq_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab 2.5M Mar 10 13:55 M2WTF_GSE118757_12_vs_WTF_GSE118757_12_DiffExp_v2_GeneBody_forSEGEXUpload_TPM_EdgeR_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab 113K Mar 10 13:55 Up_Genes_DESeq_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab 128K Mar 10 13:55 Up_Genes_EdgeR_GeneBody_M2WTF_GSE118757_12_WTF_GSE118757_12_featureCounts.txt
-rw-r--r-- 1 kkarri waxmanlab  42K Mar 10 13:55 Venn_Down.DESeq.GeneBody.HTSeq.Down.EdgeR.GeneBody.HTSeq_featureCounts.png
-rw-r--r-- 1 kkarri waxmanlab  42K Mar 10 13:55 Venn_Up.DESeq.GeneBody.HTSeq.Up.EdgeR.GeneBody.HTSeq_featureCounts.png
==========================================================
==========================================================
Finished on : Tue Mar 10 14:03:06 EDT 2020
1 minutes and 29 seconds elapsed.
==========================================================
