Skip to content
Snippets Groups Projects
Commit 6b89da1c authored by Brandi Cantarel's avatar Brandi Cantarel
Browse files

fix qc bugs with formatting

parent eb330ffc
Branches
Tags publish_0.2.1
No related merge requests found
...@@ -162,8 +162,8 @@ process parse_stat { ...@@ -162,8 +162,8 @@ process parse_stat {
script: script:
""" """
source /etc/profile.d/modules.sh source /etc/profile.d/modules.sh
module load R/3.2.1-intel git/gcc/v2.12.2 module load R/3.2.1-intel
perl $baseDir/scripts/sequenceqc_alignment_withumi.pl -r ${index_path} *.genomecov.txt perl $baseDir/scripts/parse_seqqc.pl *.genomecov.txt
perl $baseDir/scripts/covstats.pl *.mapqualcov.txt perl $baseDir/scripts/covstats.pl *.mapqualcov.txt
Rscript $baseDir/scripts/plot_hist_genocov.R Rscript $baseDir/scripts/plot_hist_genocov.R
""" """
......
Subproject commit 2c1dee613ad38e77607b4ddc0b2fa2106054e2c8 Subproject commit 679cd228273f24f037a43ba881b9d54b167d6495
...@@ -37,19 +37,6 @@ foreach $sfile (@statfiles) { ...@@ -37,19 +37,6 @@ foreach $sfile (@statfiles) {
$hash{propair} = 100*sprintf("%.4f",$1/$hash{total}); $hash{propair} = 100*sprintf("%.4f",$1/$hash{total});
} }
} }
# open FLAG, "<$prefix\.ontarget.flagstat.txt" or die $!;
# while (my $line = <FLAG>) {
# chomp($line);
# if ($line =~ m/(\d+) \+ \d+ in total/) {
# $hash{ontarget} = $1;
# }elsif ($line =~ m/(\d+) \+ \d+ read1/) {
# $hash{ontarget_pairs} = $1;
# }elsif ($line =~ m/(\d+) \+ \d+ properly paired/) {
# $hash{ontarget_propair} = 100*sprintf("%.4f",$1/$hash{total});
# }elsif ($line =~ m/(\d+) \+ \d+ properly paired/) {
# $hash{ontarget_propair} = 100*sprintf("%.4f",$1/$hash{total});
# }
# }
open ASM, "<$prefix\.alignmentsummarymetrics.txt" or die $!; open ASM, "<$prefix\.alignmentsummarymetrics.txt" or die $!;
while (my $line = <ASM>) { while (my $line = <ASM>) {
chomp($line); chomp($line);
...@@ -121,7 +108,7 @@ foreach $sfile (@statfiles) { ...@@ -121,7 +108,7 @@ foreach $sfile (@statfiles) {
} }
} }
my %cov; my %cov;
open COV, "<$prefix\.totgenomecov.txt" or die $!; open COV, "<$prefix\.genomecov.txt" or die $!;
my $sumdepth; my $sumdepth;
my $totalbases; my $totalbases;
while (my $line = <COV>) { while (my $line = <COV>) {
...@@ -146,7 +133,7 @@ foreach $sfile (@statfiles) { ...@@ -146,7 +133,7 @@ foreach $sfile (@statfiles) {
$hash{'perc50x'} = 100*sprintf("%.4f",1-$cum_sum[50]); $hash{'perc50x'} = 100*sprintf("%.4f",1-$cum_sum[50]);
$hash{'perc100x'} = 100*sprintf("%.4f",1-$cum_sum[100]); $hash{'perc100x'} = 100*sprintf("%.4f",1-$cum_sum[100]);
$hash{'perc200x'} = 100*sprintf("%.4f",1-$cum_sum[200]); $hash{'perc200x'} = 100*sprintf("%.4f",1-$cum_sum[200]);
open COV, "<$prefix\.genomecov.txt" or die $!; open COV, "<$prefix\.dedupcov.txt" or die $!;
$sumdepth = 0; $sumdepth = 0;
$totalbases = 0; $totalbases = 0;
my %dedup_cov; my %dedup_cov;
......
print(files <- list.files(path='.',pattern="totgenomecov.txt$")) print(files <- list.files(path='.',pattern="genomecov.txt$"))
print(labs <- gsub(".totgenomecov.txt", "", files, perl=TRUE)) print(labs <- gsub(".genomecov.txt", "", files, perl=TRUE))
i <- 1 i <- 1
cov <- list() cov <- list()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment