Bio::Seq::TraceI(3pm)

πŸ“¦
version 1.7.8 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– Bio::Seq::TraceI πŸ’–

okay bestie, welcome to Bio::Seq::TraceI β€” the interface definition for a Bio::Seq::Trace, part of the User Contributed Perl Documentation. she's abstract, she's a vibe, she's the blueprint every real trace object has to live up to. no cap. πŸ¦‹


✨ SYNOPSIS ✨

    # get a Bio::Seq::Qual compliant object somehow
          $st = &get_object_somehow();

    # to test this is a seq object
          $st->isa("Bio::Seq::TraceI")
               || $obj->throw("$obj does not implement the Bio::Seq::TraceI interface");

          # set the trace for T to be @trace_points
     my $arrayref = $st->trace("T",\@trace_points);
          # get the trace points for "C"
     my $arrayref = $st->trace("C");
          # get a subtrace for "G" from 10 to 100
     $arrayref = $st->subtrace("G",10,100);
          # what is the trace value for "A" at position 355?
     my $trace_calue = $st->traceat("A",355);
          # create a false trace for "A" with $accuracy
     $arrayref = $st->false_trace("A",Bio::Seq::Quality, $accuracy);
          # does this trace have entries for each base?
     $bool = $st->is_complete();
          # how many entries are there in this trace?
     $length = $st->length();

like, look at her go πŸ’… grab an object, check it isa the interface (or throw hands), then set traces, read traces, slice subtraces, peek single values, fake it with false_trace, vibe-check is_complete, and count it all with length. iconic behaviour honestly.


🌸 DESCRIPTION 🌸

so this object defines an abstract interface to basic trace information. and where does that info come from? could be an ABI- or scf- formatted file, or honestly it could just be made up. either way, she doesn't care β€” she's just the interface, periodt. ✨


🫢 FEEDBACK 🫢

πŸ’Œ Mailing Lists

user feedback is an integral part of the evolution of this and other Bioperl modules. fr fr. send your comments and suggestions preferably to one of the Bioperl mailing lists. your participation is much appreciated, bestie, we literally love you for it. πŸ₯Ή

  bioperl-l@bioperl.org                  - General discussion
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists

πŸŽ€ Support

please direct usage questions or support issues to the mailing list:

bioperl-l@bioperl.org

rather than to the module maintainer directly. the way that many experienced and reponsive experts will be able look at the problem and quickly address it >>> sliding into one person's inbox. please include a thorough description of the problem with code and data examples if at all possible β€” the more tea, the better. πŸ“

πŸ› Reporting Bugs

report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. bug reports can be submitted via the web:

  https://github.com/bioperl/bioperl-live/issues

no gatekeeping bugs, we put them on the tracker and we handle them. πŸ’€


πŸ‘‘ AUTHOR - Chad Matsalla

email bioinformatics@dieselwurks.com

(the legend himself, we stan 🫑)


⭐ APPENDIX ⭐

the rest of the documentation details each of the object methods. internal methods are usually preceded with a _ (iykyk β€” underscore means stay in your lane, that's private business πŸ™ˆ).

🧚 Implementation Specific Functions

these functions are the ones that a specific implementation must define. like, no implementation, no service. periodt. πŸ’…

🌈 trace($base,@new_values)

  • Title : trace($base,\@new_values)
  • Usage : @trace_Values = @{$obj->trace($base,\@new_values)};
  • Function: returns the trace values as a reference to an array containing the trace values. the individual elements of the trace array are not validated and can be any numeric value. (any numeric value. she does not judge. 🫢)
  • Returns : a reference to an array.
  • Status :
  • Arguments: $base : which color channel would you like the trace values for?
    • $base must be one of "A","T","G","C"
  • \@new_values : a reference to an array of values containing trace data for this base

🌈 subtrace($base,$start,$end)

  • Title : subtrace($base,$start,$end)
  • Usage : @subset_of_traces = @{$obj->subtrace("A",10,40)};
  • Function: returns the trace values from $start to $end, where the first value is 1 and the number is inclusive, ie 1-2 are the first two trace values of this base. start cannot be larger than end but can be equal. (equal is fine, bestie. overlapping is not the vibe. 🚫)
  • Returns : a reference to an array.
  • Args : $base: "A","T","G" or "C"
  • $start: a start position
  • $end : an end position

🌈 can_call_new()

  • Title : can_call_new()
  • Usage :
    if( $obj->can_call_new ) {
        $newobj = $obj->new( %param );
    }
  • Function: can_call_new returns 1 or 0 depending on whether an implementation allows new constructor to be called. if a new constructor is allowed, then it should take the followed hashed constructor list.
    $myobject->new( -qual => $quality_as_string,
                    -display_id  => $id,
                    -accession_number => $accession,
                    );
  • Example :
  • Returns : 1 or 0
  • Args :

🌈 traceat($channel,$position)

  • Title : qualat($channel,$position)
  • Usage : $trace = $obj->traceat(500);
  • Function: return the trace value at the given location, where the first value is 1 and the number is inclusive, ie 1-2 are the first two bases of the sequence. start cannot be larger than end but can be equal.
  • Returns : a scalar.
  • Args : a base and a position.

🌈 length()

  • Title : length()
  • Usage : $length = $obj->length("A");
  • Function: return the length of the array holding the trace values for the "A" channel. a check should be done to make sure that this Trace object is_complete() before doing this to prevent hazardous results. (⚠️ hazardous results!! do the vibe check first, bestie, don't just raw-dog it.)
seriously, is_complete() first. the manpage says hazardous and we take that literally. 😭
  • Returns : a scalar (the number of elements in the quality array).
  • Args : if used, get the traces from that channel. default to "A"

🌈 trace_indices($new_indices)

  • Title : trace_indices($new_indices)
  • Usage : $indices = $obj->trace_indices($new_indices);
  • Function: return the trace iindex points for this object. (yes, "iindex" β€” we keep the typo, we love her, she's part of the lore πŸ’œ)
  • Returns : a scalar
  • Args : if used, the trace indices will be set to the provided value.

and that's the whole page, bestie!! 🌈✨ this was perl v5.32.1, dated 2021-08-15, from Bio::Seq::TraceI(3pm) in the User Contributed Perl Documentation. go forth and implement the interface. slay. πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from