Skip to content
Snippets Groups Projects
Commit b5664726 authored by Max Bär's avatar Max Bär
Browse files

Merge branch 'feature_max' into 'main'

CreatePrimer class and preprocessing module

See merge request !20
parents 901220ec 40dfef17
Branches
No related tags found
1 merge request!20CreatePrimer class and preprocessing module
<primer1
TTTTTTTTTTTTTTT
File added
......@@ -8,6 +8,7 @@ import argparse
import logging
def create_parser():
"""This function creates the parser"""
parser = argparse.ArgumentParser(
prog = 'Priming site predictor',
description = 'Takes a cutoff energy and the predicts location of priming sites of transcripts',
......
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 16 14:17:06 2022
@author: baerma
"""
class CreatePrimer:
"""This Class creates an instance of a primer of a desired length and primer name
which can be saved as a fasta file. By default the length is 15 and name is primer1"""
def __init__(self, name='primer1', primerlength=15):
self.name = name
self.primer_length = primerlength
self.primer_sequence = 'T'*self.primer_length
self.lines = [f'<{self.name}', self.primer_sequence]
#print(self.primer)
#return self.primer
def create_fasta(self):
with open(f'{self.name}.fasta', 'w') as f:
for line in self.lines:
f.write(line)
f.write('\n')
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 16 14:17:06 2022
@author: baerma
"""
from createprimer import CreatePrimer
def generate_RIBlast_input():
"""This function creates a list of the filenames for the RIBlast"""
my_primer = CreatePrimer()
my_primer.create_fasta()
primer_filename = my_primer.name +".fasta"
transcripts_filename = "transcripts.fasta"
return [primer_filename, transcripts_filename]
print(generate_RIBlast_input())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment