Open YeCheng57 opened 3 years ago
NUM_SAMPLES=ls .norm.cov.bed | wc -l | awk '{print $1}' NUM_WINDOWS=ls .norm.cov.bed | head -n 1 | xargs awk '$1 != "X" && $1 != "Y" && $NF == 0 {x++} END {print x}'` echo -e "$NUM_SAMPLES\t$NUM_WINDOWS" >matrix.txt
NUM_SAMPLES=
NUM_WINDOWS=
ls *.norm.cov.bed | while read FILE do awk '$1 != "X" && $1 != "Y" && $NF == 0 { print $4 }' $FILE \ | gawk -f $CLAMMS_DIR/transpose.gawk >>matrix.txt done` Actually, I wonder if the "$NF==0" should be "$NF !=0"? Now the matrix is one zero matrix!
NUM_SAMPLES=
ls .norm.cov.bed | wc -l | awk '{print $1}'NUM_WINDOWS=
ls .norm.cov.bed | head -n 1 | xargs awk '$1 != "X" && $1 != "Y" && $NF == 0 {x++} END {print x}'` echo -e "$NUM_SAMPLES\t$NUM_WINDOWS" >matrix.txtls *.norm.cov.bed | while read FILE do awk '$1 != "X" && $1 != "Y" && $NF == 0 { print $4 }' $FILE \ | gawk -f $CLAMMS_DIR/transpose.gawk >>matrix.txt done` Actually, I wonder if the "$NF==0" should be "$NF !=0"? Now the matrix is one zero matrix!