Commit cfcd06bb authored by Laure QUINTRIC's avatar Laure QUINTRIC
Browse files

modify the way it handles trimreads and rename steps

parent 8cebe46c
#Input parameters
[common]
#Do we process trimreads ?
trimreads = %(trim)s
#Do we only rename files with abyss sample names ?
rename = %(renameonly)s
#Below configuration is optimized to use abyss-preprocessing inside abyss-pipeline
#if run alone, see the alternative configuration in the comments
directory = %(main_dir)s/thirdparty/abyss-preprocessing
......@@ -17,8 +21,3 @@ output = %(ligation_preprocess_dir)s
#if run alone : ouput=PATH_TO_OUTPUT_DIRECTORY
#correspondance between genoscope and abyss names
samplename = %(correspondance_file)s
#if run alone : samplename=PATH_TO_CSV_FILE_WITH_SAMPLE_CORRESPONDING_ABYSS_NAMES
#Do we process trimreads ?
trimreads=%(trimreads)s
#Do we only rename files with abyss sample names ?
rename=%(rename)s
......@@ -50,7 +50,7 @@ if __name__ == '__main__':
configfile = handleArgs()
#parse config file
config = configparser.SafeConfigParser(os.environ)
config = configparser.ConfigParser(os.environ)
config.read(configfile)
indir = config["common"]["indir"]
output = config["common"]["output"]
......
......@@ -9,5 +9,6 @@
#load python 3.6
. /appli/bioinfo/python/3.6/env.sh
#run extract script on config file
echo "python $directory/extractR1R2.py --trimreads $trimreads --simply-rename-files $rename --input-R1 $indir/$R1 --input-R2 $indir/$R2 --output-dir $output --barcode $barcode --properties $properties --abyss-sample-name $samplename --tmpdir $tmpdir"
python $directory/extractR1R2.py --trimreads $trimreads --simply-rename-files $rename --input-R1 $indir/$R1 --input-R2 $indir/$R2 --output-dir $output --barcode $barcode --properties $properties --abyss-sample-name $samplename --tmpdir $tmpdir
. /appli/bioinfo/python/3.6/delenv.sh
......@@ -44,8 +44,8 @@ def handleArgs():
barcode = args.barcode
tmpdir = args.tmpdir
abysssamplename = args.abysssamplename
trimreads = args.trimreads
rename = args.rename
trimreads = eval(args.trimreads)
rename = eval(args.rename)
if not os.path.isfile(inR1):
parser.error("Input file {} does not exist".format(inR1))
......@@ -69,10 +69,6 @@ def handleArgs():
if not os.path.isdir(tmpdir):
logging.debug("Tmpdir directory does not exist, going to create it")
os.system("mkdir -p {}".format(tmpdir))
if trimreads:
logging.debug("Going to trimreads at cutadapt step")
if rename:
logging.debug("Going to simply rename files with their corresponding names")
return inR1, inR2, outdir, barcode, properties, abysssamplename, tmpdir, trimreads, rename
......@@ -295,6 +291,11 @@ if __name__ == '__main__':
logging.root.removeHandler(handler)
logfile='{}/extractR1R2_{}_{}.log'.format(tmpdir,inR1.split(".fastq.gz")[0].split("/")[-1:][0], st)
logging.basicConfig(level=logging.DEBUG, filename=logfile, format='%(asctime)s %(levelname)s %(message)s', filemode='w')
if trimreads:
logging.debug("Going to trimreads at cutadapt step")
if rename:
logging.debug("Going to simply rename files with their corresponding names")
logging.debug(
"Extract forward and reverse reads from Genoscope raw sequencing data")
......
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