diff --git a/config/slurm/profile/config_plugin_dardel.yaml b/config/slurm/profile/config_plugin_dardel.yaml index bf4254f..0af768c 100644 --- a/config/slurm/profile/config_plugin_dardel.yaml +++ b/config/slurm/profile/config_plugin_dardel.yaml @@ -90,6 +90,7 @@ set-threads: - filter_biallelic_missing_vcf=48 ### PCA - vcf2plink_pca=16 + - plink_eigenvec=8 ### runs of homozygosity - filter_vcf_hwe=16 - vcf2plink_hwe=16 diff --git a/config/slurm/profile/config_plugin_rackham.yaml b/config/slurm/profile/config_plugin_rackham.yaml index 4c3a039..4aeda65 100644 --- a/config/slurm/profile/config_plugin_rackham.yaml +++ b/config/slurm/profile/config_plugin_rackham.yaml @@ -86,6 +86,7 @@ set-threads: - filter_biallelic_missing_vcf=6 ### PCA - vcf2plink_pca=2 + - plink_eigenvec=1 ### runs of homozygosity - filter_vcf_hwe=2 - vcf2plink_hwe=2 diff --git a/workflow/rules/10_pca.smk b/workflow/rules/10_pca.smk index 7c252b2..0f9c2c9 100644 --- a/workflow/rules/10_pca.smk +++ b/workflow/rules/10_pca.smk @@ -66,6 +66,7 @@ rule plink_eigenvec: output: eigenvec="results/{dataset}/pca/" + REF_NAME + ".{dataset}.merged.biallelic.fmissing{fmiss}.{chr}.eigenvec", eigenval="results/{dataset}/pca/" + REF_NAME + ".{dataset}.merged.biallelic.fmissing{fmiss}.{chr}.eigenval", + threads: 1 params: bfile="results/{dataset}/pca/" + REF_NAME + ".{dataset}.merged.biallelic.fmissing{fmiss}.{chr}", log: @@ -77,7 +78,7 @@ rule plink_eigenvec: samples=`cat {input.fam} | wc -l` if [ "$samples" -gt 1 ] then - plink --bfile {params.bfile} --allow-extra-chr --pca --out {params.bfile} 2> {log} + plink --bfile {params.bfile} --threads {threads} --allow-extra-chr --pca --out {params.bfile} 2> {log} else touch {output.eigenvec} && touch {output.eigenval} 2> {log} echo "Not enough samples to calculate a PCA." >> {log}