동일한 snakefile에서 두 개의 규칙 (gatk_Mutect2
및 gatk_IndelRealigner
)을 실행해야합니다.snakemake : 규칙을 다른 규칙에서 잘못된 모드로 연결하십시오.
다른 뱀 파일에이 규칙을 넣으면 오류없이 실행할 수 있습니다.
두 입력 기능 (get_files_somatic
및 get_files
)을 사용합니다. 둘 다 사전 키로 사례 이름을 사용합니다. (각각의 경우는 정상입니다.) 이 룰을 같은 snakefile에 넣으면 snakemake는 gatk_IndelRealigner
의 입력에서 법선 ID를 찾으려고 시도합니다.
내 질문 : 두 규칙의 모호성을 어떻게 관리 할 수 있습니까? 나는 snakemake가이 두 규칙을 연결하지 않기를 바란다.
def get_files_somatic(wildcards):
case = wildcards.case
control = aCondition[case][0]
return ["{}.sorted.dup.reca.cleaned.bam".format(case),"{}.sorted.dup.reca.cleaned.bam".format(control)]
rule all:
input: expand("{sample}.sorted.dup.reca.cleaned.bam",sample=create_tumor()),
expand("Results/vcf/{case}.vcf",case=create_tumor()),
include_prefix="rules"
include:
include_prefix + "/gatk2.rules"
include:
include_prefix + "/mutec2.rules"
rule gatk_Mutect2:
input: get_files_somatic,
output: "Results/vcf/{case}.vcf",
params:
log: "logs/{case}.mutect2.log"
threads: 8
shell:
rule gatk_IndelRealigner:
input:
get_files,
output:
"{case}.sorted.dup.reca.cleaned.bam",
"{case}.sorted.dup.reca.cleaned.bai",
params:
log:
"mapped_reads/merged_samples/logs/{case}_indel_realign_2.log"
threads: 8
shell:
def get_files(wildcards):
case = wildcards.case
control = aCondition[case][0]
wildcards.control = control
return ["mapped_reads/merged_samples/{}.sorted.dup.reca.bam".format(case), "mapped_reads/merged_samples/{}.sorted.dup.reca.bam".format(control),"mapped_reads/merged_samples/operation/{}_{}.realign.intervals".format(case,control)]
문제를 자세히 설명하고 명확하게 설명하십시오. – bli
@bli이 경우 snakemake 파이프 라인에 문제가 있습니다.이 경우 두 개의 다른 snakemake 파일에서 파이프 라인을 다이빙해야합니다. 하나는 gat_Indellrealign을 수행하고 다른 하나는 Mutect2를 다이빙해야합니다. snakemake를 멈출 수있는 방법이 두 가지 규칙을 연결하려고합니까? 도움을 주신 덕분에 –