Commit 22845539 authored by Eric CHARPENTIER's avatar Eric CHARPENTIER 🐍
Browse files

checking project name during config file creation

parent 1e004588
......@@ -49,10 +49,17 @@ with open(os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__
if(args.referencename in references):
d["reference"] = references[args.referencename]
# Write samples
d["samplesCondition"] = list()
alphanum = re.compile('^[\w-]+$')
alphanumStartLetter = re.compile('^[a-zA-Z]+[\w-]+$')
# Check project name
if(not alphanum.match(d["project-name"])):
print("Invalid character or empty field in project name")
sys.exit()
# Check sample names and write samples
d["samplesCondition"] = list()
count = 1
try:
for name,condition in csv.reader(args.samplesheet, delimiter='\t'):
......
Supports Markdown
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