Commit 52e1f457 authored by Laure QUINTRIC's avatar Laure QUINTRIC
Browse files
parents b8ab4652 8cebe46c
This diff is collapsed.
......@@ -47,6 +47,8 @@ Final output files are names :
* PROPERTIES : path to file containing forward and reverse primers for different markers
* BARCODE : name of the marker (ie : 18S-V1) (this marker must be listed in the PROPERTIES file)
* SAMPLENAME : path to the csv file containing abyss and genoscope sample names
* TRIMREADS : set to True if you want to perform all abyss preprocessing (cutadapt, bbmap, renaming) (option : True/False)
* RENAME : set to True if you only want to rename original samples with their abyss names without triming reads (option : True/False)
**extract.sh** : script which will run extract.py on the configuration file **extract.ini**. Each samples (and its two "paired-end" files) will be parse separately.
**extract.py** : python script that will read extract.ini file and launch extractR1R2.pbs calculation or each sample. The check.pbs script is run at the end to verify that all files are created at the end of the process for each sample.
......
......@@ -18,3 +18,7 @@ output = %(ligation_preprocess_dir)s
#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
......@@ -58,6 +58,8 @@ if __name__ == '__main__':
barcode = config["common"]["barcode"]
samplename = config["common"]["samplename"]
directory = config["common"]["directory"]
trimreads = config["common"]["trimreads"]
rename = config["common"]["rename"]
# logging config
if not os.path.isdir(output):
......@@ -71,7 +73,7 @@ if __name__ == '__main__':
logger = logging.getLogger()
logger.debug("HELLO WORLD, BEGINNING PROCESS !")
logger.debug("BEGINNING PROCESS !")
tmpdir= "{}/logs".format(output)
if not os.path.isdir(tmpdir):
......@@ -122,6 +124,8 @@ if __name__ == '__main__':
os.environ['properties']=properties
os.environ['samplename']=samplename
os.environ['tmpdir']=tmpdir
os.environ['trimreads']=trimreads
os.environ['rename']=rename
cmd="qsub -o {}/logs -V {}/extractR1R2.pbs".format(output, directory)
......@@ -130,8 +134,9 @@ if __name__ == '__main__':
logger.debug("job number : {}".format(out))
#check if number of generated files is ok
cmd="qsub -o {}/logs -V -W depend=afterok:{} {}/check.pbs".format(output,":".join(jobs), directory)
check = runcmd(cmd).strip().split(".")[0]
if not rename :
cmd="qsub -o {}/logs -V -W depend=afterok:{} {}/check.pbs".format(output,":".join(jobs), directory)
check = runcmd(cmd).strip().split(".")[0]
else :
logging.debug("No fastq.gz files found in {}, exiting program".format(indir))
sys.exit(1)
......
#!/usr/bin/env bash
#PBS -S /usr/bin/sh
#PBS -q omp
#PBS -l ncpus=8
#PBS -q sequentiel
#PBS -l ncpus=1
#PBS -l mem=20g
#PBS -l walltime=1:00:00
#PBS -m n
......@@ -9,5 +9,5 @@
#load python 3.6
. /appli/bioinfo/python/3.6/env.sh
#run extract script on config file
python $directory/extractR1R2.py --trimreads --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
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