Mercurial > repos > jackcurragh > ribogalaxy_umi_extraction
comparison UMI_riboseq_tool/UMI.py @ 1:4605a1af1f3d draft default tip
Uploaded
| author | triasteran |
|---|---|
| date | Fri, 30 Sep 2022 09:07:04 +0000 |
| parents | 393b73b2eb5f |
| children |
comparison
equal
deleted
inserted
replaced
| 0:393b73b2eb5f | 1:4605a1af1f3d |
|---|---|
| 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 |
