Commit fddb462c authored by Antony Le Béchec's avatar Antony Le Béchec

Merge branch '0.9.18.2'

parents a0abe019 2651143c
......@@ -9,7 +9,7 @@
### MODULE INFOS
DOCKER_STARK_MODULE_NAME=pool
DOCKER_STARK_MODULE_NAME=multisampleanalysis
DOCKER_STARK_MODULE_RELEASE=1.0
......
......@@ -12,9 +12,9 @@ services:
# cli
stark-module-pool-submodule-pool-service-cli:
stark-module-multisampleanalysis-submodule-pool-service-cli:
image: ${DOCKER_STARK_MODULE_SUBMODULE_SERVICE_CLI_IMAGE}
# depends_on: stark-module-pool-submodule-pool-service-setup
# depends_on: stark-module-multisampleanalysis-submodule-pool-service-setup
build:
context: ${DOCKER_STARK_MODULE_SUBMODULE_SERVICE_CLI_IMAGE_CONTEXT}
dockerfile: ${DOCKER_STARK_MODULE_SUBMODULE_SERVICE_CLI_IMAGE_CONTEXT_DOCKERFILE}
......@@ -42,7 +42,7 @@ services:
# listener
stark-module-pool-submodule-pool-service-listener:
stark-module-multisampleanalysis-submodule-pool-service-listener:
image: ${DOCKER_STARK_MODULE_SUBMODULE_SERVICE_LISTENER_IMAGE}
container_name: ${DOCKER_STARK_MODULE_SUBMODULE_SERVICE_LISTENER_CONTAINER_NAME}
entrypoint: ${DOCKER_STARK_MODULE_SUBMODULE_SERVICE_LISTENER_CONTAINER_ENTRYPOINT}
......
File mode changed from 100644 to 100755
......@@ -93,6 +93,46 @@ def get_sample_list_from_samplesheet(samplesheetPath):
sampleList[i] = sampleList[i].replace(" ", "_")
return sampleList
# def getDescriptionFromSample(sample, runDir):
# samplesheetPath = find_any_samplesheet(runDir)
# assert samplesheetPath != "NO_SAMPLESHEET_FOUND", \
# "[ERROR] find_any_samplesheet() couldn't find any samplesheet. Check if the --fromResultDir argument is set correctly."
# inDataTable = False
# description = []
# with open(samplesheetPath, "r") as f:
# for l in f:
# if not inDataTable:
# if l.startswith("Sample_ID,Sample_Name,"):
# inDataTable = True
# DescriptionIndex = l.strip().split(",").index("Description")
# else:
# if sample in l:
# description.append(l.strip().split(",")[DescriptionIndex])
# return description
# def getPool(description, sexTag):
# if re.search("APP#[A-Z0-9]*.[A-Z0-9]*#POOL", description) and sexTag in description:
# return True
# else:
# return False
def is_pool(runDir, sample, sexTag):
"""
checks if sample is a pool of samples of given sex according to sample tag file
"""
isPool = False
correctSex = False
with open(osj(runDir, sample, sample+".tag"), "r") as f:
for l in f:
if "#POOL" in l:
isPool = True
if sexTag in l:
correctSex = True
if isPool and correctSex:
return True
else:
return False
def main(args):
dockerOutputDir = "/app/res"
# dockerOutputDir = osj(args.runDir,"res")
......@@ -115,10 +155,10 @@ def main(args):
bam = osj(args.runDir, s, "STARK", s+".bwamem.bam")
# tagFile = osj(args.runDir, s, s+".tag")
vcfList.append(vcf)
if re.match("(POOL_[A-Z0-9]*_M_[0-9]*)", s):
if is_pool(args.runDir, s, "SEX#M"):
assert poolMStr == "init", "[ERROR] More than one sample is named POOL_([A-Z]*)_M_([0-9]*) in the samplesheet"
poolMStr = "POOL_M:"+vcf+":"+bam
if re.match("(POOL_[A-Z0-9]*_F_[0-9]*)", s):
if is_pool(args.runDir, s, "SEX#F"):
assert poolFStr == "init", "[ERROR] More than one sample is named POOL_([A-Z]*)_F_([0-9]*) in the samplesheet"
poolFStr = "POOL_F:"+vcf+":"+bam
bed = osj(args.runDir, s, "STARK", s+".bed")
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment