diff --git a/build_jflow_command_line.py b/build_jflow_command_line.py
index 74a653fb8d54830c0b767b06fd1bc532e51d714f..aa59004da790ac8f0b2482e2b34352fdbbd52b0a 100755
--- a/build_jflow_command_line.py
+++ b/build_jflow_command_line.py
@@ -6,6 +6,7 @@ parser = argparse.ArgumentParser(description='Generate simulated populations wit
 parser.add_argument("--nb-inds", help="Number of individuals to generate", required=True)
 parser.add_argument("--reference", help="Reference genome", required=True)
 parser.add_argument("--prepare", help="Prepare workflow (default is detection workflow)", action='store_const', const=True, default=False)
+parser.add_argument("--res-dir", help="Results dirs containing fastq reads files", default="res")
 parser.add_argument("--chromosomes", help="Chromosomes list, comma separated", default=False)
 parser.add_argument("--params", help="Other parameters for the workflow", default=False)
 parser.add_argument("--bams-dir", help="Directory containing bams for each individual, created by cnvprepare", default=False)
@@ -36,7 +37,8 @@ cmd += "--reference-genome " + reference
 
 if args.prepare:
     for i in range(1, int(nb_inds)+1):
-        cmd += " --sample name=\"INDIV_{0}\" reads-1=\"res/INDIV_{0}_100_180_1.fq.gz\" reads-2=\"res/INDIV_{0}_100_180_2.fq.gz\"".format(i)
+        cmd += " --sample name=\"INDIV_{0}\" reads-1=\"" + args.res_dir + "/INDIV_{0}_100_180_1.fq.gz\" reads-2=\"" + \
+               args.res_dir + "/INDIV_{0}_100_180_2.fq.gz\"".format(i)
 else:
     for i in range(1, int(nb_inds)+1):
         cmd += " --sample name=\"INDIV_{0}\" alignments=\"{1}/INDIV_{0}-sorted-md.bam\"".format(i, bams_dir)