Mercurial > repos > triasteran > ribogalaxy_umi_processing
comparison UMI_riboseq_tool/UMI.py @ 16:cf1a0cbe5c34 draft
Uploaded
| author | triasteran |
|---|---|
| date | Fri, 30 Sep 2022 09:27:53 +0000 |
| parents | 0b5c3e35cddb |
| children |
comparison
equal
deleted
inserted
replaced
| 15:b90ecf790d5b | 16:cf1a0cbe5c34 |
|---|---|
| 48 | 48 |
| 49 if is_gz_file(pathToFastaFile) == True: | 49 if is_gz_file(pathToFastaFile) == True: |
| 50 print ('file is gzipped fastq') | 50 print ('file is gzipped fastq') |
| 51 with gzip.open(pathToFastaFile, "rt") as handle: | 51 with gzip.open(pathToFastaFile, "rt") as handle: |
| 52 for i, record in enumerate(SeqIO.parse(handle, "fastq")): | 52 for i, record in enumerate(SeqIO.parse(handle, "fastq")): |
| 53 process_fastq_record(record, output, UMI_5_prime_length=2, UMI_3_prime_length=5) | 53 process_fastq_record(record, output, UMI_5_prime_length, UMI_3_prime_length) |
| 54 | 54 |
| 55 else: | 55 else: |
| 56 for record in SeqIO.parse(pathToFastaFile, 'fastq'): | 56 for record in SeqIO.parse(pathToFastaFile, 'fastq'): |
| 57 process_fastq_record(record, output, UMI_5_prime_length, UMI_3_prime_length) | 57 process_fastq_record(record, output, UMI_5_prime_length, UMI_3_prime_length) |
| 58 | 58 |
