[Bioperl-l] length of hit->description
Fields, Christopher J
cjfields at illinois.edu
Thu Jul 24 18:14:44 UTC 2014
That is unusual. The only recourse is to submit a bug report to Github and attach an example report giving the error. My feeling is that this might be a change in the output for FASTA.
chris
On Jul 24, 2014, at 12:54 PM, Antony Vincent <antony.vincent.1 at ulaval.ca> wrote:
> Hello,
>
> Thank you for the quick answer.
>
> Here is a part of the code:
> #fasta parameters
> my $fh;
> my $query = 'MyORF.tfa';
> my $library = "$library";
> my $fasta = 'fasta35';
>
>
> # The fasta parsing part
> my $command = "$fasta -b 1 $query $library";
>
> open $fh,"$command |" || die("cannot run fasta cmd of $command: $!\n");
>
> my $searchio = Bio::SearchIO->new(-format => 'fasta', -fh => $fh);
> while( my $result = $searchio->next_result ) {
> ## $result is a Bio::Search::Result::ResultI compliant object
> while( my $hit = $result->next_hit ) {
> ## $hit is a Bio::Search::Hit::HitI compliant object
> while( my $hsp = $hit->next_hsp ) {
> ## $hsp is a Bio::Search::HSP::HSPI compliant object
> if( $hsp->length('total') > $length*0.85) {
> if ( $hsp->frac_conserved >= 0.65) {
>
>
> print $hit->description(500), "\n";
>
>
>
> }
> }
> }
> }
> }
>
> The correct result should be :
> repB putative plasmid replication protein RepB
>
> And I get:
> repB putative plasmid replication protein R
>
> Thank you,
>
> Antony
>
> Le 2014-07-24 à 13:48, Fields, Christopher J <cjfields at illinois.edu> a écrit :
>
>> You’ll have to be more explicit. What is the analysis (BLAST, FASTA, BLAT, etc)? What is the expected result?
>>
>> Most of the above parsers will take the hit name as the first set of non-whitespace characters, and anything after that is put into the description.
>>
>> chris
>>
>> On Jul 24, 2014, at 12:04 PM, Antony03 <antony.vincent.1 at ulaval.ca> wrote:
>>
>>> Hello,
>>>
>>> When I use hit->description I get a truncated result like this:
>>>
>>> repB putative plasmid replication protein R
>>>
>>> I tried hit->description(500) and I get the same result.
>>>
>>> Is there something wrong?
>>>
>>> Thanks
>>>
>>>
>>>
>>> --
>>> View this message in context: http://bioperl.996286.n3.nabble.com/length-of-hit-description-tp17596.html
>>> Sent from the Bioperl-L mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Bioperl-l mailing list
>>> Bioperl-l at mailman.open-bio.org
>>> http://mailman.open-bio.org/mailman/listinfo/bioperl-l
>>
>
More information about the Bioperl-l
mailing list