Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bio::Restriction::Analysis::fragment does not check if enzyme exists #4

Open
fgvieira opened this issue Oct 10, 2017 · 2 comments
Open

Comments

@fgvieira
Copy link

Dear all,

I tried using the fragments function, but it was not cutting. After some looking around. I found out Bioperl does not check if the enzyme exists!

For example:

use Bio::SeqIO;
use Bio::Restriction::Analysis;

$seqio=Bio::SeqIO->new(-file=>'dna1.fa', -format=>'fasta');
$seq=$seqio->next_seq;
$ra = Bio::Restriction::Analysis->new(-seq=>$seq);

foreach $frag ($ra->fragments('RsaI')){
    print $frag."\n";
}

works fine, but if I replace RsaI for a random string, it just prints out the full sequence. Shouldn't it give an error that the enzyme was not found?

thanks,

@cjfields
Copy link
Member

@fgvieira yes, that should check for the enzyme and fail otherwise. This should be a straightforward fix, did you want to take it on to expedite it?

@fgvieira
Copy link
Author

fgvieira commented Jan 4, 2018

sure, I can give it a try, but do you have an idea of where would be the best place to check if the enzyme exists? I could put it under fragments, but this calls fragment_maps, which in turn calls cut that in turn calls _cuts`, and so on...

I was thinking that it would be nice to include the check as "low" as possible in order to be triggered by as many routines as possible, but not sure where it would be best.

@cjfields do you have any suggestion?
thanks,

@carandraug carandraug transferred this issue from bioperl/bioperl-live Dec 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants