我的工作是下一代测序(NGS) DNA分析。我正在使用SeqIO Biopython模块解析Fasta格式的DNA库。我只想过滤唯一的克隆(唯一的记录)。为此,我将使用以下python代码。
seen=[]
unique_clones=[]
records=list(SeqIO.parse('DNA_library', 'fasta'))
for record in records:
if str(record.seq) not in seen:
seen.append(str(record.seq))
unique_clones.appen
dict = {}
tag = ""
with open('/storage/emulated/0/Download/sequence.fasta.txt','r') as sequence:
seq = sequence.readlines()
for line in seq:
if line.startswith(">"):
tag = line.replace("\n", "")
else:
我正在尝试将一个文件读入哈希。
问题
my $primer_seq_14bp = q(); // --> works
my $primer_seq_14bp; // --> error
Use of uninitialized value $primer_seq_14bp in hash element at ./script.pl line 24, <FWDPRIMER> line 1.
为什么需要将这个变量声明为空字符串?
这是我的第一个“我自己”脚本的一部分,所以欢迎对格式化、效率等方面的反馈!
码
#!/usr/bin/perl
use strict; use