diff --git a/scripts/launch_set.pl b/scripts/launch_set.pl index a3fec71..ab74614 100755 --- a/scripts/launch_set.pl +++ b/scripts/launch_set.pl @@ -611,7 +611,7 @@ sub variantCalls{ } if(!-e $regionsFile){ system("rm -fv $regionsFile.*.tmp"); - my $command="samtools view -H $initBam | grep \"\@SQ\" | sed 's/^.*SN://g' | cut -f 1 | xargs -I {} -n 1 -P $$settings{numcpus} sh -c \"samtools mpileup -suf $ref -r '{}' $initBam | bcftools call -c | grep -v '^#' | cut -f 1,2 > $regionsFile.'{}'.tmp \" "; + my $command="samtools view -H $initBam | grep \"\@SQ\" | sed 's/^.*SN://g' | cut -f 1 | xargs -n 1 -P $$settings{numcpus} sh -c \"samtools mpileup -suf $ref -r '$0' $initBam | bcftools call -c | grep -v '^#' | cut -f 1,2 > $regionsFile.'$0'.tmp \" "; $sge->pleaseExecute($command,{numcpus=>$$settings{numcpus},jobname=>"snpPositionDiscovery"}); $sge->wrapItUp(); diff --git a/scripts/mergeVcf.sh b/scripts/mergeVcf.sh index 75920d8..54ced5b 100755 --- a/scripts/mergeVcf.sh +++ b/scripts/mergeVcf.sh @@ -67,7 +67,7 @@ echo "$script: temporary directory is $TEMPDIR"; echo "$script: Running bcftools merge"; export IN; export script; -echo "$REGION" | xargs -P $NUMCPUS -n 1 -I {} bash -c 'echo "$script: merging SNPs in {}"; out='$TEMPDIR'/merged.$$.vcf; bcftools merge --merge all --regions "{}" --force-samples -o $out $IN && bgzip $out && tabix $out.gz && echo "$script: finished with region {}";' +echo "$REGION" | xargs -P $NUMCPUS -n 1 bash -c 'echo "$script: merging SNPs in $0"; out='$TEMPDIR'/merged.$$.vcf; bcftools merge --merge all --regions "$0" --force-samples -o $out $IN && bgzip $out && tabix $out.gz && echo "$script: finished with region $0";' if [ $? -gt 0 ]; then echo "$script: ERROR with bcftools merge" rm -rvf $TEMPDIR;