BiobaseTypes-0.2.0.1: Collection of types for bioinformatics

Safe HaskellNone
LanguageHaskell2010

Biobase.Types.Location

Description

Annotate the genomic Location of features or elements. A Location is always contiguous, using strand, 0-based position, and length. Transformation to different systems of annotation is made possible.

Synopsis

Documentation

data Location Source #

Location information.

Constructors

Location 

Fields

Instances
Eq Location Source # 
Instance details

Defined in Biobase.Types.Location

Ord Location Source # 
Instance details

Defined in Biobase.Types.Location

Read Location Source # 
Instance details

Defined in Biobase.Types.Location

Show Location Source # 
Instance details

Defined in Biobase.Types.Location

Generic Location Source # 
Instance details

Defined in Biobase.Types.Location

Associated Types

type Rep Location :: Type -> Type #

Methods

from :: Location -> Rep Location x #

to :: Rep Location x -> Location #

Reversing Location Source # 
Instance details

Defined in Biobase.Types.Location

type Rep Location Source # 
Instance details

Defined in Biobase.Types.Location

type Rep Location = D1 (MetaData "Location" "Biobase.Types.Location" "BiobaseTypes-0.2.0.1-B9coIbijR6NEFcCxvqIOZp" False) (C1 (MetaCons "Location" PrefixI True) ((S1 (MetaSel (Just "_lStrand") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Strand) :*: S1 (MetaSel (Just "_lStart") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Index 0))) :*: (S1 (MetaSel (Just "_lLength") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int) :*: S1 (MetaSel (Just "_lTotalLength") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))

startEndInclusive :: KnownNat k => Iso' Location (Strand, (Index k, Index k), Int) Source #

An isomorphism between locations, and triples of Strand,Start,End, where end is inclusive. For length==0 locations, this will mean start<end on the plus strand.

This should hold for all k, in Index k.

data PartialLocation Source #

During streaming construction, it is possible that we know a feature is on the - strand, but the length of the contig is not known yet.

0         1         2
012345678901234567890
  >---                    +        2 4    Location +  2 4
     <---                 Reversed 5 4    Location - 12 4
098765432109876543210
2         1         0

Constructors

PartialLocation

Location, when it is not yet known how long the contig will be.

Fields

ReversedPartialLocation

The reversed strand. However, we have an plEnd, not a plStart now!

Fields

Instances
Eq PartialLocation Source # 
Instance details

Defined in Biobase.Types.Location

Ord PartialLocation Source # 
Instance details

Defined in Biobase.Types.Location

Read PartialLocation Source # 
Instance details

Defined in Biobase.Types.Location

Show PartialLocation Source # 
Instance details

Defined in Biobase.Types.Location

Generic PartialLocation Source # 
Instance details

Defined in Biobase.Types.Location

Associated Types

type Rep PartialLocation :: Type -> Type #

Reversing PartialLocation Source #

Reversing a reversible location means moving the start to the end.

Instance details

Defined in Biobase.Types.Location

type Rep PartialLocation Source # 
Instance details

Defined in Biobase.Types.Location

type Rep PartialLocation = D1 (MetaData "PartialLocation" "Biobase.Types.Location" "BiobaseTypes-0.2.0.1-B9coIbijR6NEFcCxvqIOZp" False) (C1 (MetaCons "PartialLocation" PrefixI True) (S1 (MetaSel (Just "_plStrand") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Strand) :*: (S1 (MetaSel (Just "_plStart") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Index 0)) :*: S1 (MetaSel (Just "_plLength") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))) :+: C1 (MetaCons "ReversedPartialLocation" PrefixI True) (S1 (MetaSel (Just "_plStrand") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Strand) :*: (S1 (MetaSel (Just "_plEnd") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Index 0)) :*: S1 (MetaSel (Just "_plLength") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))