It will ignore the current existence of a fastq file when generating
the condor submit script.
In addition it will tell srf2named_fastq to --force as well.
apidata,
opts.sequence,
library_result_map,
apidata,
opts.sequence,
library_result_map,
+ not opts.single,
+ force=opts.force)
if opts.ini:
make_submission_ini(opts.host, apidata, library_result_map, not opts.single)
if opts.ini:
make_submission_ini(opts.host, apidata, library_result_map, not opts.single)
action="store_true")
parser.add_option('--daf', default=None, help='specify daf name')
action="store_true")
parser.add_option('--daf', default=None, help='specify daf name')
+ parser.add_option('--force', default=False, action="store_true",
+ help="Force regenerating fastqs")
# configuration options
parser.add_option('--apiid', default=apiid, help="Specify API ID")
# configuration options
parser.add_option('--apiid', default=apiid, help="Specify API ID")
return parser
def build_fastqs(host, apidata, sequences_path, library_result_map,
return parser
def build_fastqs(host, apidata, sequences_path, library_result_map,
+ paired=True, force=False ):
"""
Generate condor scripts to build any needed fastq files
"""
Generate condor scripts to build any needed fastq files
target_name = fastq_single_template % filename_attributes
target_pathname = os.path.join(result_dir, target_name)
target_name = fastq_single_template % filename_attributes
target_pathname = os.path.join(result_dir, target_name)
- if not os.path.exists(target_pathname):
+ if force or not os.path.exists(target_pathname):
t = needed_targets.setdefault(target_pathname, {})
t[seq.filetype] = seq
t = needed_targets.setdefault(target_pathname, {})
t[seq.filetype] = seq
for target_pathname, available_sources in needed_targets.items():
logging.debug(' target : %s' % (target_pathname,))
logging.debug(' candidate sources: %s' % (available_sources,))
for target_pathname, available_sources in needed_targets.items():
logging.debug(' target : %s' % (target_pathname,))
logging.debug(' candidate sources: %s' % (available_sources,))
qseq_condor_entries.append(
condor_qseq_to_fastq(source.path,
target_pathname,
qseq_condor_entries.append(
condor_qseq_to_fastq(source.path,
target_pathname,
+ source.flowcell,
+ force=force)
)
elif available_sources.has_key('srf'):
source = available_sources['srf']
)
elif available_sources.has_key('srf'):
source = available_sources['srf']
target_pathname,
paired,
source.flowcell,
target_pathname,
paired,
source.flowcell,
)
else:
print " need file", target_pathname
)
else:
print " need file", target_pathname
return contents
def condor_srf_to_fastq(srf_file, target_pathname, paired, flowcell=None,
return contents
def condor_srf_to_fastq(srf_file, target_pathname, paired, flowcell=None,
+ mid=None, force=False):
args = ['-c', srf_file, ]
if paired:
args.extend(['--left', target_pathname])
args = ['-c', srf_file, ]
if paired:
args.extend(['--left', target_pathname])
if mid is not None:
args.extend(['-m', str(mid)])
if mid is not None:
args.extend(['-m', str(mid)])
+ if force:
+ args.extend(['--force'])
+
script = """
arguments="%s"
queue
script = """
arguments="%s"
queue
-def condor_qseq_to_fastq(qseq_file, target_pathname, flowcell=None):
+def condor_qseq_to_fastq(qseq_file, target_pathname, flowcell=None, force=False):
args = ['-i', qseq_file, '-o', target_pathname ]
if flowcell is not None:
args.extend(['-f', flowcell])
args = ['-i', qseq_file, '-o', target_pathname ]
if flowcell is not None:
args.extend(['-f', flowcell])