for suspicion of contamination') args = parser.parse_args() seq_run = args.run samplenames = args.samples adaIDs = args.adaIDs fragments = args.fragments VERBOSE = args.verbose maxreads = args.maxreads submit = args.submit summary = args.summary max_mismatches = args.max_mismatches susp_mismatches = args.susp_mismatches if seq_run is not None: samples = load_samples_sequenced(seq_runs=[seq_run]) if adaIDs is not None: samples = samples.loc[samples.adapter.isin(adaIDs)] if VERBOSE >= 3: print 'adaIDs', samples.adapter else: samples = load_samples_sequenced().loc[samplenames] for (samplename, sample) in samples.iterrows(): sample = SampleSeq(sample) if VERBOSE >= 1: print samplename if str(sample.PCR) == 'nan': if VERBOSE: print 'PCR type not found, skipping'
parser.add_argument('--max-mismatches', type=int, default=20, dest='max_mismatches', help='Maximal number of mismatches to select') args = parser.parse_args() seq_runs = args.runs samplenames = args.samples adaIDs = args.adaIDs fragments = args.fragments use_pats = args.use_pats VERBOSE = args.verbose maxseqs = args.maxseqs min_mismatches = args.min_mismatches max_mismatches = args.max_mismatches samples = load_samples_sequenced() if seq_runs is not None: samples = samples.loc[samples['seq run'].isin(seq_runs)] if adaIDs is not None: samples = samples.loc[samples.adapter.isin(adaIDs)] if use_pats: samples = samples.loc[samples['patient sample'] != 'nan'] else: samples = samples.loc[samplenames] if fragments is None: fragments = ['F'+str(i+1) for i in xrange(6)] alis = {fr: AlignIO.read(get_consensi_alignment_filename('all', fr), 'fasta')
help='Maximal number of reads to analyze') parser.add_argument('--filtered', action='store_true', help='Analyze filtered reads') args = parser.parse_args() samplenames = args.samples seq_runs = args.runs adaIDs = args.adaIDs fragments = args.fragments VERBOSE = args.verbose maxreads = args.maxreads use_filtered = args.filtered # If the script is called with no adaID, iterate over all if seq_runs is not None: samples = load_samples_sequenced(seq_runs=seq_runs) if adaIDs is not None: samples = samples.loc[samples.adapter.isin(adaIDs)] if VERBOSE >= 3: print 'adaIDs', samples.adapter else: samples = load_samples_sequenced().loc[samplenames] if len(samples) == 0: print 'WARNING: no samples found.' sys.exit() hists = [] for (samplename, sample) in samples.iterrows(): if VERBOSE == 1: