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

πŸ’– LICENSE πŸ’–

okay bestie, before we get into the fun stuff, legal said I have to tell you this and honestly? slay of them.

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.

no cap, that's the whole thing. read it, it's giving "please just use it responsibly" πŸ’…

✨ NAME ✨

Bio::DB::HTS::Constants β€” Constants for use with SAM/BAM

(and yeah, this page shows up as Bio::D...nstants(3pm) in the header because the terminal is dramatic and truncates things, but the real name is the whole thing, iykyk πŸŽ€)


πŸ¦‹ SYNOPSIS πŸ¦‹

use Bio::DB::HTS::Constants;
my $pad_flag = BAM_CPAD;

that's it. that's the vibe. import the module, grab a constant, go be a main character 🌸


🌈 DESCRIPTION 🌈

so this module exports several constants for use with the SAM/BAM module. that's literally its whole job and it does it flawlessly, no notes.

See the SAM documentation for their interpretation. β€” like, I can hand you the constants but the meaning? that's between you and the SAM spec, bestie 🫢

πŸŽ€ Cigar operations πŸŽ€

the whole cigar squad, in order, no one left behind:

  • BAM_CIGAR_SHIFT
  • BAM_CIGAR_MASK
  • BAM_CMATCH
  • BAM_CINS
  • BAM_CDEL
  • BAM_CREF_SKIP
  • BAM_CSOFT_CLIP
  • BAM_CHARD_CLIP
  • BAM_CPAD

nine constants, all iconic, all accounted for πŸ’œ

πŸ’… FLAGS πŸ’…

a hashref that maps flag values to human-readable names. for example:

FLAGS->{0x0008} == 'M_UNMAPPED'

the way that 0x0008 just becomes a whole readable string?? obsessed. 😭✨

πŸ“ RFLAGS πŸ“

the reverse of FLAGS β€” same energy, opposite direction:

RFLAGS->{M_UNMAPPED} == 0x0008

so you can go name β†’ number instead of number β†’ name. both directions, because the module is a generous queen πŸ‘‘


πŸ‘‘ AUTHOR πŸ‘‘

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

(yes, the <gt> is in there exactly like that. I don't make the rules, I just transcribe them fr fr πŸ™ˆ)


πŸ”₯ SEE ALSO πŸ”₯

  • Bio::Perl
  • Bio::DB::HTS
  • Bio::DB::Bam::Alignment

go read those next, bestie, the lore runs deep ⭐


and that's the whole page!! brought to you by perl v5.40.0, dated 2024-10-31, and the one and only Bio::D...nstants(3pm) β€” stay constant, stay iconic, periodt πŸ’–πŸ§šπŸ’€

πŸ“¦ where this page comes from