Remove parenthesis from the FASTQ ID
This commit is contained in:
parent
52eaee4568
commit
e826d6f92b
|
@ -1,6 +1,7 @@
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from glob import glob
|
from glob import glob
|
||||||
from typing import List, Tuple
|
from typing import List, Tuple
|
||||||
|
from re import sub
|
||||||
|
|
||||||
from pandas import DataFrame, read_html, Series
|
from pandas import DataFrame, read_html, Series
|
||||||
|
|
||||||
|
@ -35,7 +36,9 @@ def preprocess_dataframe(adapters) -> Series:
|
||||||
def save_to_file(filename, adapters) -> None:
|
def save_to_file(filename, adapters) -> None:
|
||||||
with open(filename, "w") as f:
|
with open(filename, "w") as f:
|
||||||
for index, value in adapters.iteritems():
|
for index, value in adapters.iteritems():
|
||||||
fasta_entry = f">{index}\n{value}\n"
|
sequence_str = "".join(map(str, index))
|
||||||
|
sequence_id = sub(r"[()]", "", sequence_str)
|
||||||
|
fasta_entry = f">{sequence_id}\n{value}\n"
|
||||||
f.write(fasta_entry)
|
f.write(fasta_entry)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue