Skip to content

Commit 0219cee

Browse files
committed
update
1 parent b06d4fe commit 0219cee

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

multithreading.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ cd ${stacks_dir}
220220
vcftools --vcf populations.snps.vcf --out mean_depth_stat --site-mean-depth
221221
awk '{$4="";print $0}' mean_depth_stat.ldepth.mean | awk '$0=NR" "$0' > SNP_Mean_Depth.txt
222222
cd ${workdir}
223-
r -f r_plot.r
223+
cp ./stacks/SNP_Mean_Depth.txt tmp.txt
224+
R -f r_plot.r
225+
rm tmp.txt
224226
if test -f "Rectangular-Manhattan.MEAN_DEPTH_depth.jpg"; then
225227
mv Rectangular-Manhattan.MEAN_DEPTH_depth.jpg ./statistics/SNP_Depth_0.jpg
226228
else
@@ -232,9 +234,12 @@ cd ${stacks_dir}
232234
cat populations.snps.vcf | grep -E '#' > vcfform.txt
233235
sed -e '/#CHROM/r vcfform.txt' snps_depth_10.txt | sed '1d' > snps_depth_10.vcf
234236
rm vcfform.txt
235-
vcftools --vcf populations.snps.vcf --site-mean-depth | awk '{$4="";print $0}' mean_depth_stat.ldepth.mean | awk '$0=NR" "$0' >> SNP_Mean_Depth.txt
237+
vcftools --vcf snps_depth_10.vcf --site-mean-depth --out mean_depth_stat_10
238+
awk '{$4="";print $0}' mean_depth_stat_10.ldepth.mean | awk '$0=NR" "$0' > SNP_Mean_Depth_10.txt
236239
cd ${workdir}
237-
r -f r_plot.r
240+
cp ./stacks/SNP_Mean_Depth_10.txt tmp.txt
241+
R -f r_plot.r
242+
rm tmp.txt
238243
if test -f "Rectangular-Manhattan.MEAN_DEPTH_depth.jpg"; then
239244
mv Rectangular-Manhattan.MEAN_DEPTH_depth.jpg ./statistics/SNP_Depth_10.jpg
240245
else

r_plot.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
library(CMplot);
22
data<-read.table(file = "./tmp.txt",header = TRUE);
3-
CMplot(data,plot.type="m",cex=0.8, band=0.5,col=c("grey30","grey60"),threshold = 10,threshold.lty = 1,LOG10=FALSE,ylab = "Average Depth of SNP", file="jpg", memo="depth", dpi=300, file.output=TRUE, verbose=TRUE);
3+
CMplot(data,plot.type="m",cex=0.8, band=0.5,col=c("grey30","grey60"),threshold = 10,threshold.lty = 1,LOG10=TRUE,ylab = "Average Depth of SNP", file="jpg", memo="depth", dpi=300, file.output=TRUE, verbose=TRUE);

0 commit comments

Comments
 (0)