Commit 3333b614 authored by sauloal's avatar sauloal
Browse files

2012-11-06_13_30_01_01_00 :: 1 :: D => 1

parent 9094f064
#!/bin/bash
# print "CHECKING {}\n"
INFOLDER=out
#INFOLDER=out_fastq
find $INFOLDER/*.pos.cov -exec perl -ane '
BEGIN {
%s = ();
$cc = 0;
$min = 4;
}
END {
foreach my $k ( sort keys %s ) {
$countAll = $s{$k}[0];
$countValid = $s{$k}[1];
$countMin = $s{$k}[2];
$sum = $s{$k}[3];
$sumMin = $s{$k}[4];
printf "%s => ALL %11d / %11d = %8.1f | VALID %11d / %11d = %8.1f | GT%d %11d / %11d = %8.1f | VAL/ALL %5.2f%% GT%d/ALL %5.2f%%\n",
$k, $sum, $countAll, ($sum/$countAll),
$sum, $countValid, ($sum/$countValid),
$min, $sumMin, $countMin, ($sumMin/$countMin),
($countValid/$countAll*100), $min, ($countMin/$countAll*100);
};
};
$n="{}";
last if $cc++ >= 100000 && 0;
$s{$n}[0]++;
$s{$n}[1]++ if $F[1];
$s{$n}[2]++ if $F[1] > $min;
$s{$n}[3]+=$F[1];
$s{$n}[4]+=$F[1] if $F[1] > $min;' {} \; | tee cov.log
find /mnt/nexenta/aflit001/nobackup/Data/Heinz/Heinz_454/ -type f -name '*.sff' | xargs -I{} --max-args=1 --no-run-if-empty --max-procs=40 bash -c 'BN=`basename {}`; PA=`dirname ${}`; PA=`basename $PA` ; FN="data2/$PA""_$BN"; if [[ ! -f "$FN.fastq" ]]; then echo " CONVERTING $FN.fastq ({})" ; sff_extract_to_fastq {} $FN; echo " CONVERTING $FN.fastq ({}) DONE"; else echo " CONVERTING $FN.fastq ({}) ... ALREADY CONVERTED ... OK"; fi'
ls -1 /home/aflit001/temptive/probes/mapping/data2/*{1,2}.fastq | xargs -I{} --max-args=1 --no-run-if-empty --max-procs=4 bash -c ' FN="{}.sam"; echo -n "CHECKING $FN ({}) "; if [[ ! -f "$FN" ]]; then echo " MAPPING"; bwa bwasw -t 10 bwa/S_lycopersicum_chromosomes {} >> $FN; echo " {} :: $FN DONE"; else echo " OK"; fi'
ls -1 /home/aflit001/temptive/probes/mapping/data2/*n.fastq | xargs -I{} --max-args=1 --no-run-if-empty --max-procs=4 bash -c ' FN="{}.sam"; echo -n "CHECKING $FN ({}) "; if [[ ! -f "$FN" ]]; then echo " MAPPING"; bwa bwasw -t 10 bwa/S_lycopersicum_chromosomes {} >> $FN; echo " {} :: $FN DONE"; else echo " OK"; fi'
find /mnt/nexenta/aflit001/nobackup/Data/Heinz/Heinz_Illumina/ -type f -name '*.fastq' | xargs -I{} --max-args=1 --no-run-if-empty --max-procs=4 bash -c 'BN=`basename {}`; PA=`dirname ${}`; PA=`basename $PA` ; FN="data1/$PA\_$BN.sam"; echo -n "CHECKING $FN ({}) "; if [[ ! -f "$FN" ]]; then echo " MAPPING"; bwa bwasw -t 10 bwa/S_lycopersicum_chromosomes {} >> $FN; echo " {} :: $FN DONE"; else echo " OK"; fi'
Supports Markdown
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