Hi, I’m writing code that depends on the FASTX and BioSequences packages.
My hope is that this issue is independent of the packages I am using.
What I am trying to do is very simple… I have a set of fasta entries (A file with a header followed by a sequence, header, sequence, etc…) that I what to extract by a unique ID, which are contained in a set.
When I include this if statement to check for set membership, nothing is written to the file. When I remove the if statement, all the entries are properly written to the file. The remaining code is properly executed in both cases.
My hope is that this issue is independent of the packages I am using. Any ideas?
function getrecords(in::IO,out::IO,s::Set)
reader,writer = FASTQ.Reader(in),FASTA.Writer(out)
for record ∈ reader
id = identifier(record)
if id ∉ s
continue
end
seq = sequence(LongRNA{2},record)
seq = convert(LongDNA{2},seq)
write(writer,FASTA.Record(id,description(record),seq)) # must specify this for nanopore!
end
return
end