diff --git a/create_samplesheet.py b/create_samplesheet.py index cadcef6..abc49d3 100755 --- a/create_samplesheet.py +++ b/create_samplesheet.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 import argparse, os, tempfile, json, re, logging, sys -VERSION="0.2" +VERSION="0.3" # Consts MODE_STRING_CSV = 0 @@ -18,6 +18,11 @@ def __init__(self, name, path, data): self.path = path self.data = data +def sanitize_input(input_str, disallowed_chars = [',', ' ', '<', '>', '.', "'", '"', ';', ':'], replcement='_'): + for i in disallowed_chars: + input_str = input_str.replace(i, '_') + return input_str + def sample_name(aa_seq, seq_chars=6): trunc_aa_seq = aa_seq[:min(seq_chars, len(aa_seq))] return trunc_aa_seq