Bio::D...::Query(3pm)

🌸 Bio::DB::HTS::Query πŸ’–

okay bestie, so this is Bio::DB::HTS::Query β€” the perl manpage for it (that's the (3pm) part, iykyk). It's the lil object that holds the query portion of a BAM/SAM alignment. Pull up a chair, we're doing bioinformatics but make it cute. 🧬✨


πŸ’… LICENSE

Copyright [2015-2018] EMBL-European Bioinformatics Institute

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


🫢 AUTHOR

Rishi Nag <rishi@ebi.ac.uk<gt>

not me leaving the angle bracket situation exactly as written bestie, I don't make the rules, I just transcribe them πŸ’€

✨ NAME ✨

Bio::DB::HTS::Query β€” it's the object representing the query portion of a BAM/SAM alignment. main character of exactly one half of an alignment, periodt. πŸ‘‘


🌈 SYNOPSIS

so like. you've got an alignment, right? and you got it from a Bio::DB::HTS database? slay. here's the vibe:

Given an alignment retrieved from a Bio::DB::HTS database,

 my $query = $alignment->query;

 my $name   = $query->display_name;
 my $start  = $query->start;
 my $end    = $query->end;
 my $dna    = $query->dna;    # dna string
 my $seq    = $query->seq;    # Bio::PrimarySeq object
 my @scores = $query->qscore; # quality score

look at her go πŸ¦‹ literally just grab the query off the alignment and then ask her whatever you wanna know.


πŸŽ€ DESCRIPTION

This is a simple Bio::SeqFeatureI object that represents the query part of a SAM alignment. That's it, that's the whole job. she's simple, she's effective, she's iconic. πŸ’…

🧚 Methods

  • $seqid = $query->seq_id β€” the name of the read. πŸ“
  • $name = $query->name β€” the read name (same as seq_id in this case, yes literally the same, no she's not being shady).
  • $name = $query->display_name β€” the read display_name (also same as seq_id in this case, trio of twins fr fr).
  • $tag = $query->primary_tag β€” the string "match". that's it. that's the tag. πŸ’€
  • $tag = $query->source_tag β€” the string "sam/bam".
  • $start = $query->start β€” the start of the match in read coordinates.
  • $end = $query->end β€” the end of the match in read coordinates;
  • $len = $query->length β€” the length of the read. πŸ“
  • $seq = $query->seq β€” a Bio::PrimarySeq representing the read sequence in REFERENCE orientation. okay so orientation matters, keep that in your notes bestie.
  • $scores = $query->qscore β€” the read quality scores. In a list context, a list of integers equal in length to the read sequence length. In a scalar context, an array ref. The qscores are in REFERENCE sequence orientation. (yes. again. orientation. the way she keeps reminding us 😭)
  • $dna = $query->dna β€” the DNA string in reference sequence orientation. 🧬
  • $strand = $query->strand β€” if the query was reversed to align it, -1. Otherwise +1. that's the whole vibe check right there.
  • $seq = $query->subseq($start,$end) β€” return a Bio::PrimarySeq object representing the requested subsequence on the read. give her a range, she gives you a seq. obsessed. 🫢

πŸ”₯ SEE ALSO

  • Bio::Perl
  • Bio::DB::HTS
  • Bio::DB::HTS::Alignment
  • Bio::DB::HTS::Constants

go read those too, they're the friend group and they all ate. πŸ‘‘


perl v5.40.0 Β· 2024-10-31

and that's the whole page bestie!! πŸ’– this was Bio::DB::HTS::Query from the perl docs, version v5.40.0, dated 2024-10-31. no cap, you're now a query girlie. go forth and align. πŸŒΈβœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from