-
Notifications
You must be signed in to change notification settings - Fork 0
/
Picard_CollectRnaSeqMetrics_SE_v1.pl
48 lines (29 loc) · 1.18 KB
/
Picard_CollectRnaSeqMetrics_SE_v1.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#######################################################
#
# Script name: Picard_CollectRnaSeqMetrics_SE_v1
# Language: Perl
# Program: Picard/CollectRnaSeqMetrics
# Purpose: Quality control of bam files from single end sequenceing data
# Author: Arindam Ghosh
# Date: 4 September 2019
#
#######################################################
#!/usr/bin/perl
use Cwd;
$cwd = getcwd;
open (FH, "/home/dell/Documents/Arindam/WorkB/PRJEB4879/PRJEB4879.txt");
@file = <FH>;
close FH;
for($i=1; $i<@file; $i++)
{
@col = split(/\t/, "$file[$i]");
mkdir $col[1];
chdir "$cwd/$col[1]";
print "\nCollecting Alignment Metrics for $col[1]\n";
$picard_cmd = "java -jar /home/dell/Documents/Softwares/Picard/picard.jar CollectRnaSeqMetrics I=/home/dell/Documents/Arindam/WorkB/PRJEB4879/Align/$col[1]/$col[1].bam O=$cwd/$col[1]/$col[1]_Picard.RNAmetrics REF_FLAT=/home/dell/Documents/Arindam/Work/ReferenceGenome/Human_84/refFlat/refFlat.txt.gz STRAND_SPECIFICITY=NONE RIBOSOMAL_INTERVALS=/home/dell/Documents/Arindam/Work/ReferenceGenome/Human_84/Ribosomal_Intervals/GRCh38.rRNA.interval_list";
system($picard_cmd);
open (FP, '>', 'align_cmd.txt');
print FP $picard_cmd;
close FP;
chdir $cwd;
};