def _prep_bam_input(f, i, base): if not os.path.exists(f): raise ValueError("Could not find input file: %s" % f) cur = copy.deepcopy(base) cur["files"] = [os.path.abspath(f)] cur["description"] = sample_name(f) or os.path.splitext(os.path.basename(f))[0] return cur
def _prep_bam_input(f, i, base): if not os.path.exists(f): raise ValueError("Could not find input file: %s" % f) cur = copy.deepcopy(base) cur["files"] = [os.path.abspath(f)] cur["description"] = ((sample_name(f) if f.endswith(".bam") else None) or os.path.splitext(os.path.basename(f))[0]) return cur
def _get_bam_samples(f, data): have_full_file = False if have_full_file: return [bam.sample_name(f)] else: if os.path.basename(f).startswith("%s-" % dd.get_sample_name(data)): return [dd.get_sample_name(data)] else: return []
def _get_bam_samples(f, items): have_full_file = False if have_full_file: return [bam.sample_name(f)] else: for data in items: if os.path.basename(f).startswith(("%s-" % dd.get_sample_name(data), "%s." % dd.get_sample_name(data))): return [dd.get_sample_name(data)] return []
def _prep_bam_input(f, i, base): if not os.path.exists(f) and not objectstore.is_remote(f): raise ValueError("Could not find input file: %s" % f) cur = copy.deepcopy(base) if objectstore.is_remote(f): cur["files"] = [f] cur["description"] = os.path.splitext(os.path.basename(f))[0] else: cur["files"] = [os.path.abspath(f)] cur["description"] = ((sample_name(f) if f.endswith(".bam") else None) or os.path.splitext(os.path.basename(f))[0]) return cur
def _get_bam_samples(f): return [bam.sample_name(f)]