{-# LANGUAGE DeriveDataTypeable    #-}
{-# LANGUAGE DeriveGeneric         #-}
{-# LANGUAGE FlexibleContexts      #-}
{-# LANGUAGE FlexibleInstances     #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedLists       #-}
{-# LANGUAGE OverloadedStrings     #-}
{-# LANGUAGE PackageImports        #-}
{-# LANGUAGE RecordWildCards       #-}
{-# LANGUAGE TemplateHaskell       #-}
{-# LANGUAGE TypeFamilies          #-}
{-# Language QuasiQuotes           #-}

-- |
-- Module      :  Data.SAM.Version1_6.Alignment.BOPT
-- Copyright   :  (c) Matthew Mosior 2023
-- License     :  BSD-style
-- Maintainer  :  mattm.github@gmail.com
-- Portability :  portable
--
-- = WARNING
--
-- This module is considered __internal__.
--
-- The Package Versioning Policy __does not apply__.
--
-- The contents of this module may change __in any way whatsoever__
-- and __without any warning__ between minor versions of this package.
--
-- Authors importing this library are expected to track development
-- closely.
--
-- All credit goes to the author(s)/maintainer(s) of the
-- [containers](https://hackage.haskell.org/package/containers) library
-- for the above warning text.
--
-- = Description
--
-- This library enables the decoding/encoding of SAM, BAM and CRAM file formats.

module Data.SAM.Version1_6.Alignment.BOPT ( -- * SAM version 1.6 alignment optional fields data type
                                            SAM_V1_6_Alignment_BOPT(..),
                                            SAM_V1_6_Alignment_BOPT_Int8(..),
                                            SAM_V1_6_Alignment_BOPT_Word8(..),
                                            SAM_V1_6_Alignment_BOPT_Int16(..),
                                            SAM_V1_6_Alignment_BOPT_Word16(..),
                                            SAM_V1_6_Alignment_BOPT_Int32(..),
                                            SAM_V1_6_Alignment_BOPT_Word32(..)
                                          ) where

import Data.Data
import Data.Int
import Data.Sequence
import Data.Word
import Generics.Deriving.Base


-- | Custom SAM (version 1.6) @"SAM_V1_6_Alignment_BOPT"@ data type.
-- See section 1.5 of the [SAM v1.6](http://samtools.github.io/hts-specs/SAMv1.pdf) specification documentation.
data SAM_V1_6_Alignment_BOPT = SAM_V1_6_Alignment_BOPT { SAM_V1_6_Alignment_BOPT -> Maybe SAM_V1_6_Alignment_BOPT_Int8
sam_v1_6_alignment_bopt_int8   :: Maybe SAM_V1_6_Alignment_BOPT_Int8
                                                       , SAM_V1_6_Alignment_BOPT -> Maybe SAM_V1_6_Alignment_BOPT_Word8
sam_v1_6_alignment_bopt_word8  :: Maybe SAM_V1_6_Alignment_BOPT_Word8
                                                       , SAM_V1_6_Alignment_BOPT -> Maybe SAM_V1_6_Alignment_BOPT_Int16
sam_v1_6_alignment_bopt_int16  :: Maybe SAM_V1_6_Alignment_BOPT_Int16
                                                       , SAM_V1_6_Alignment_BOPT -> Maybe SAM_V1_6_Alignment_BOPT_Word16
sam_v1_6_alignment_bopt_word16 :: Maybe SAM_V1_6_Alignment_BOPT_Word16
                                                       , SAM_V1_6_Alignment_BOPT -> Maybe SAM_V1_6_Alignment_BOPT_Int32
sam_v1_6_alignment_bopt_int32  :: Maybe SAM_V1_6_Alignment_BOPT_Int32
                                                       , SAM_V1_6_Alignment_BOPT -> Maybe SAM_V1_6_Alignment_BOPT_Word32
sam_v1_6_alignment_bopt_word32 :: Maybe SAM_V1_6_Alignment_BOPT_Word32
                                                       }
  deriving ((forall x.
 SAM_V1_6_Alignment_BOPT -> Rep SAM_V1_6_Alignment_BOPT x)
-> (forall x.
    Rep SAM_V1_6_Alignment_BOPT x -> SAM_V1_6_Alignment_BOPT)
-> Generic SAM_V1_6_Alignment_BOPT
forall x. Rep SAM_V1_6_Alignment_BOPT x -> SAM_V1_6_Alignment_BOPT
forall x. SAM_V1_6_Alignment_BOPT -> Rep SAM_V1_6_Alignment_BOPT x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SAM_V1_6_Alignment_BOPT -> Rep SAM_V1_6_Alignment_BOPT x
from :: forall x. SAM_V1_6_Alignment_BOPT -> Rep SAM_V1_6_Alignment_BOPT x
$cto :: forall x. Rep SAM_V1_6_Alignment_BOPT x -> SAM_V1_6_Alignment_BOPT
to :: forall x. Rep SAM_V1_6_Alignment_BOPT x -> SAM_V1_6_Alignment_BOPT
Generic,Typeable)

instance Show SAM_V1_6_Alignment_BOPT where
  show :: SAM_V1_6_Alignment_BOPT -> String
show (SAM_V1_6_Alignment_BOPT Maybe SAM_V1_6_Alignment_BOPT_Int8
int8 Maybe SAM_V1_6_Alignment_BOPT_Word8
word8 Maybe SAM_V1_6_Alignment_BOPT_Int16
int16 Maybe SAM_V1_6_Alignment_BOPT_Word16
word16 Maybe SAM_V1_6_Alignment_BOPT_Int32
int32 Maybe SAM_V1_6_Alignment_BOPT_Word32
word32) =
    String
"SAM_V1_6_Alignment_BOPT { "           String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
"sam_v1_6_alignment_bopt_int8 = "      String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Maybe SAM_V1_6_Alignment_BOPT_Int8 -> String
forall a. Show a => a -> String
show Maybe SAM_V1_6_Alignment_BOPT_Int8
int8)                            String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , sam_v1_6_alignment_bopt_word8 = "  String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Maybe SAM_V1_6_Alignment_BOPT_Word8 -> String
forall a. Show a => a -> String
show Maybe SAM_V1_6_Alignment_BOPT_Word8
word8)                           String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , sam_v1_6_alignment_bopt_int16 = "  String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Maybe SAM_V1_6_Alignment_BOPT_Int16 -> String
forall a. Show a => a -> String
show Maybe SAM_V1_6_Alignment_BOPT_Int16
int16)                           String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , sam_v1_6_alignment_bopt_word16 = " String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Maybe SAM_V1_6_Alignment_BOPT_Word16 -> String
forall a. Show a => a -> String
show Maybe SAM_V1_6_Alignment_BOPT_Word16
word16)                          String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , sam_v1_6_alignment_bopt_int32 = "  String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Maybe SAM_V1_6_Alignment_BOPT_Int32 -> String
forall a. Show a => a -> String
show Maybe SAM_V1_6_Alignment_BOPT_Int32
int32)                           String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , sam_v1_6_alignment_bopt_word32 = " String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Maybe SAM_V1_6_Alignment_BOPT_Word32 -> String
forall a. Show a => a -> String
show Maybe SAM_V1_6_Alignment_BOPT_Word32
word32)                          String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" }"

-- | __c__CsSiIf of the last optional field (type B).
-- See section 1.5 of the [SAM v1.6](http://samtools.github.io/hts-specs/SAMv1.pdf) specification documentation.
data SAM_V1_6_Alignment_BOPT_Int8 = SAM_V1_6_Alignment_BOPT_Int8 { SAM_V1_6_Alignment_BOPT_Int8 -> Seq Word8
sam_v1_6_alignment_bopt_int8_tag   :: Seq Word8
                                                                 , SAM_V1_6_Alignment_BOPT_Int8 -> Word8
sam_v1_6_alignment_bopt_int8_type  :: Word8
                                                                 , SAM_V1_6_Alignment_BOPT_Int8 -> Seq Int8
sam_v1_6_alignment_bopt_int8_value :: Seq Int8
                                                                 }
  deriving ((forall x.
 SAM_V1_6_Alignment_BOPT_Int8 -> Rep SAM_V1_6_Alignment_BOPT_Int8 x)
-> (forall x.
    Rep SAM_V1_6_Alignment_BOPT_Int8 x -> SAM_V1_6_Alignment_BOPT_Int8)
-> Generic SAM_V1_6_Alignment_BOPT_Int8
forall x.
Rep SAM_V1_6_Alignment_BOPT_Int8 x -> SAM_V1_6_Alignment_BOPT_Int8
forall x.
SAM_V1_6_Alignment_BOPT_Int8 -> Rep SAM_V1_6_Alignment_BOPT_Int8 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SAM_V1_6_Alignment_BOPT_Int8 -> Rep SAM_V1_6_Alignment_BOPT_Int8 x
from :: forall x.
SAM_V1_6_Alignment_BOPT_Int8 -> Rep SAM_V1_6_Alignment_BOPT_Int8 x
$cto :: forall x.
Rep SAM_V1_6_Alignment_BOPT_Int8 x -> SAM_V1_6_Alignment_BOPT_Int8
to :: forall x.
Rep SAM_V1_6_Alignment_BOPT_Int8 x -> SAM_V1_6_Alignment_BOPT_Int8
Generic,Typeable)

instance Eq SAM_V1_6_Alignment_BOPT_Int8 where
  SAM_V1_6_Alignment_BOPT_Int8 Seq Word8
sam_v1_6_alignment_bopt_int8_tag1 Word8
sam_v1_6_alignment_bopt_int8_type1 Seq Int8
sam_v1_6_alignment_bopt_int8_value1 == :: SAM_V1_6_Alignment_BOPT_Int8
-> SAM_V1_6_Alignment_BOPT_Int8 -> Bool
== SAM_V1_6_Alignment_BOPT_Int8 Seq Word8
sam_v1_6_alignment_bopt_int8_tag2 Word8
sam_v1_6_alignment_bopt_int8_type2 Seq Int8
sam_v1_6_alignment_bopt_int8_value2 = Seq Word8
sam_v1_6_alignment_bopt_int8_tag1 Seq Word8 -> Seq Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== Seq Word8
sam_v1_6_alignment_bopt_int8_tag2 Bool -> Bool -> Bool
&& Word8
sam_v1_6_alignment_bopt_int8_type1 Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== Word8
sam_v1_6_alignment_bopt_int8_type2 Bool -> Bool -> Bool
&& Seq Int8
sam_v1_6_alignment_bopt_int8_value1 Seq Int8 -> Seq Int8 -> Bool
forall a. Eq a => a -> a -> Bool
== Seq Int8
sam_v1_6_alignment_bopt_int8_value2

instance Show SAM_V1_6_Alignment_BOPT_Int8 where
  show :: SAM_V1_6_Alignment_BOPT_Int8 -> String
show (SAM_V1_6_Alignment_BOPT_Int8 Seq Word8
tag
                                     Word8
bopttype
                                     Seq Int8
value
       ) =
    String
"SAM_V1_6_Alignment_BOPT_Int8 { " String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
"tag  = "                         String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Seq Word8 -> String
forall a. Show a => a -> String
show Seq Word8
tag)                        String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , type = "                      String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Word8 -> String
forall a. Show a => a -> String
show Word8
bopttype)                   String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , value = "                     String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Seq Int8 -> String
forall a. Show a => a -> String
show Seq Int8
value)                      String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" }"

-- | c__C__sSiIf of the last optional field (type B).
-- See section 1.5 of the [SAM v1.6](http://samtools.github.io/hts-specs/SAMv1.pdf) specification documentation.
data SAM_V1_6_Alignment_BOPT_Word8 = SAM_V1_6_Alignment_BOPT_Word8 { SAM_V1_6_Alignment_BOPT_Word8 -> Seq Word8
sam_v1_6_alignment_bopt_word8_tag   :: Seq Word8
                                                                   , SAM_V1_6_Alignment_BOPT_Word8 -> Word8
sam_v1_6_alignment_bopt_word8_type  :: Word8
                                                                   , SAM_V1_6_Alignment_BOPT_Word8 -> Seq Word8
sam_v1_6_alignment_bopt_word8_value :: Seq Word8
                                                                   }
  deriving ((forall x.
 SAM_V1_6_Alignment_BOPT_Word8
 -> Rep SAM_V1_6_Alignment_BOPT_Word8 x)
-> (forall x.
    Rep SAM_V1_6_Alignment_BOPT_Word8 x
    -> SAM_V1_6_Alignment_BOPT_Word8)
-> Generic SAM_V1_6_Alignment_BOPT_Word8
forall x.
Rep SAM_V1_6_Alignment_BOPT_Word8 x
-> SAM_V1_6_Alignment_BOPT_Word8
forall x.
SAM_V1_6_Alignment_BOPT_Word8
-> Rep SAM_V1_6_Alignment_BOPT_Word8 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SAM_V1_6_Alignment_BOPT_Word8
-> Rep SAM_V1_6_Alignment_BOPT_Word8 x
from :: forall x.
SAM_V1_6_Alignment_BOPT_Word8
-> Rep SAM_V1_6_Alignment_BOPT_Word8 x
$cto :: forall x.
Rep SAM_V1_6_Alignment_BOPT_Word8 x
-> SAM_V1_6_Alignment_BOPT_Word8
to :: forall x.
Rep SAM_V1_6_Alignment_BOPT_Word8 x
-> SAM_V1_6_Alignment_BOPT_Word8
Generic,Typeable)

instance Eq SAM_V1_6_Alignment_BOPT_Word8 where
  SAM_V1_6_Alignment_BOPT_Word8 Seq Word8
sam_v1_6_alignment_bopt_word8_tag1 Word8
sam_v1_6_alignment_bopt_word8_type1 Seq Word8
sam_v1_6_alignment_bopt_word8_value1 == :: SAM_V1_6_Alignment_BOPT_Word8
-> SAM_V1_6_Alignment_BOPT_Word8 -> Bool
== SAM_V1_6_Alignment_BOPT_Word8 Seq Word8
sam_v1_6_alignment_bopt_word8_tag2 Word8
sam_v1_6_alignment_bopt_word8_type2 Seq Word8
sam_v1_6_alignment_bopt_word8_value2 = Seq Word8
sam_v1_6_alignment_bopt_word8_tag1 Seq Word8 -> Seq Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== Seq Word8
sam_v1_6_alignment_bopt_word8_tag2 Bool -> Bool -> Bool
&& Word8
sam_v1_6_alignment_bopt_word8_type1 Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== Word8
sam_v1_6_alignment_bopt_word8_type2 Bool -> Bool -> Bool
&& Seq Word8
sam_v1_6_alignment_bopt_word8_value1 Seq Word8 -> Seq Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== Seq Word8
sam_v1_6_alignment_bopt_word8_value2

instance Show SAM_V1_6_Alignment_BOPT_Word8 where
  show :: SAM_V1_6_Alignment_BOPT_Word8 -> String
show (SAM_V1_6_Alignment_BOPT_Word8 Seq Word8
tag
                                      Word8
bopttype
                                      Seq Word8
value
       ) =
    String
"SAM_V1_6_Alignment_BOPT_Word8 { " String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
"tag  = "                          String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Seq Word8 -> String
forall a. Show a => a -> String
show Seq Word8
tag)                         String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , type = "                       String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Word8 -> String
forall a. Show a => a -> String
show Word8
bopttype)                    String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , value = "                      String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Seq Word8 -> String
forall a. Show a => a -> String
show Seq Word8
value)                       String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" }"

-- | cC__s__SiIf of the last optional field (type B).
-- See section 1.5 of the [SAM v1.6](http://samtools.github.io/hts-specs/SAMv1.pdf) specification documentation.
data SAM_V1_6_Alignment_BOPT_Int16 = SAM_V1_6_Alignment_BOPT_Int16 { SAM_V1_6_Alignment_BOPT_Int16 -> Seq Word8
sam_v1_6_alignment_bopt_int16_tag   :: Seq Word8
                                                                   , SAM_V1_6_Alignment_BOPT_Int16 -> Word8
sam_v1_6_alignment_bopt_int16_type  :: Word8
                                                                   , SAM_V1_6_Alignment_BOPT_Int16 -> Seq Int16
sam_v1_6_alignment_bopt_int16_value :: Seq Int16
                                                                   }
  deriving ((forall x.
 SAM_V1_6_Alignment_BOPT_Int16
 -> Rep SAM_V1_6_Alignment_BOPT_Int16 x)
-> (forall x.
    Rep SAM_V1_6_Alignment_BOPT_Int16 x
    -> SAM_V1_6_Alignment_BOPT_Int16)
-> Generic SAM_V1_6_Alignment_BOPT_Int16
forall x.
Rep SAM_V1_6_Alignment_BOPT_Int16 x
-> SAM_V1_6_Alignment_BOPT_Int16
forall x.
SAM_V1_6_Alignment_BOPT_Int16
-> Rep SAM_V1_6_Alignment_BOPT_Int16 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SAM_V1_6_Alignment_BOPT_Int16
-> Rep SAM_V1_6_Alignment_BOPT_Int16 x
from :: forall x.
SAM_V1_6_Alignment_BOPT_Int16
-> Rep SAM_V1_6_Alignment_BOPT_Int16 x
$cto :: forall x.
Rep SAM_V1_6_Alignment_BOPT_Int16 x
-> SAM_V1_6_Alignment_BOPT_Int16
to :: forall x.
Rep SAM_V1_6_Alignment_BOPT_Int16 x
-> SAM_V1_6_Alignment_BOPT_Int16
Generic,Typeable)

instance Eq SAM_V1_6_Alignment_BOPT_Int16 where
  SAM_V1_6_Alignment_BOPT_Int16 Seq Word8
sam_v1_6_alignment_bopt_int16_tag1 Word8
sam_v1_6_alignment_bopt_int16_type1 Seq Int16
sam_v1_6_alignment_bopt_int16_value1 == :: SAM_V1_6_Alignment_BOPT_Int16
-> SAM_V1_6_Alignment_BOPT_Int16 -> Bool
== SAM_V1_6_Alignment_BOPT_Int16 Seq Word8
sam_v1_6_alignment_bopt_int16_tag2 Word8
sam_v1_6_alignment_bopt_int16_type2 Seq Int16
sam_v1_6_alignment_bopt_int16_value2 = Seq Word8
sam_v1_6_alignment_bopt_int16_tag1 Seq Word8 -> Seq Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== Seq Word8
sam_v1_6_alignment_bopt_int16_tag2 Bool -> Bool -> Bool
&& Word8
sam_v1_6_alignment_bopt_int16_type1 Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== Word8
sam_v1_6_alignment_bopt_int16_type2 Bool -> Bool -> Bool
&& Seq Int16
sam_v1_6_alignment_bopt_int16_value1 Seq Int16 -> Seq Int16 -> Bool
forall a. Eq a => a -> a -> Bool
== Seq Int16
sam_v1_6_alignment_bopt_int16_value2

instance Show SAM_V1_6_Alignment_BOPT_Int16 where
  show :: SAM_V1_6_Alignment_BOPT_Int16 -> String
show (SAM_V1_6_Alignment_BOPT_Int16 Seq Word8
tag
                                      Word8
bopttype
                                      Seq Int16
value
       ) =
    String
"SAM_V1_6_Alignment_BOPT_Int16 { " String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
"tag  = "                          String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Seq Word8 -> String
forall a. Show a => a -> String
show Seq Word8
tag)                         String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , type = "                       String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Word8 -> String
forall a. Show a => a -> String
show Word8
bopttype)                    String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , value = "                      String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Seq Int16 -> String
forall a. Show a => a -> String
show Seq Int16
value)                       String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" }"

-- | cCs__S__iIf of the last optional field (type B).
-- See section 1.5 of the [SAM v1.6](http://samtools.github.io/hts-specs/SAMv1.pdf) specification documentation.
data SAM_V1_6_Alignment_BOPT_Word16 = SAM_V1_6_Alignment_BOPT_Word16 { SAM_V1_6_Alignment_BOPT_Word16 -> Seq Word8
sam_v1_6_alignment_bopt_word16_tag   :: Seq Word8
                                                                     , SAM_V1_6_Alignment_BOPT_Word16 -> Word8
sam_v1_6_alignment_bopt_word16_type  :: Word8
                                                                     , SAM_V1_6_Alignment_BOPT_Word16 -> Seq Word16
sam_v1_6_alignment_bopt_word16_value :: Seq Word16
                                                                     }
  deriving ((forall x.
 SAM_V1_6_Alignment_BOPT_Word16
 -> Rep SAM_V1_6_Alignment_BOPT_Word16 x)
-> (forall x.
    Rep SAM_V1_6_Alignment_BOPT_Word16 x
    -> SAM_V1_6_Alignment_BOPT_Word16)
-> Generic SAM_V1_6_Alignment_BOPT_Word16
forall x.
Rep SAM_V1_6_Alignment_BOPT_Word16 x
-> SAM_V1_6_Alignment_BOPT_Word16
forall x.
SAM_V1_6_Alignment_BOPT_Word16
-> Rep SAM_V1_6_Alignment_BOPT_Word16 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SAM_V1_6_Alignment_BOPT_Word16
-> Rep SAM_V1_6_Alignment_BOPT_Word16 x
from :: forall x.
SAM_V1_6_Alignment_BOPT_Word16
-> Rep SAM_V1_6_Alignment_BOPT_Word16 x
$cto :: forall x.
Rep SAM_V1_6_Alignment_BOPT_Word16 x
-> SAM_V1_6_Alignment_BOPT_Word16
to :: forall x.
Rep SAM_V1_6_Alignment_BOPT_Word16 x
-> SAM_V1_6_Alignment_BOPT_Word16
Generic,Typeable)

instance Eq SAM_V1_6_Alignment_BOPT_Word16 where
  SAM_V1_6_Alignment_BOPT_Word16 Seq Word8
sam_v1_6_alignment_bopt_word16_tag1 Word8
sam_v1_6_alignment_bopt_word16_type1 Seq Word16
sam_v1_6_alignment_bopt_word16_value1 == :: SAM_V1_6_Alignment_BOPT_Word16
-> SAM_V1_6_Alignment_BOPT_Word16 -> Bool
== SAM_V1_6_Alignment_BOPT_Word16 Seq Word8
sam_v1_6_alignment_bopt_word16_tag2 Word8
sam_v1_6_alignment_bopt_word16_type2 Seq Word16
sam_v1_6_alignment_bopt_word16_value2 = Seq Word8
sam_v1_6_alignment_bopt_word16_tag1 Seq Word8 -> Seq Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== Seq Word8
sam_v1_6_alignment_bopt_word16_tag2 Bool -> Bool -> Bool
&& Word8
sam_v1_6_alignment_bopt_word16_type1 Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== Word8
sam_v1_6_alignment_bopt_word16_type2 Bool -> Bool -> Bool
&& Seq Word16
sam_v1_6_alignment_bopt_word16_value1 Seq Word16 -> Seq Word16 -> Bool
forall a. Eq a => a -> a -> Bool
== Seq Word16
sam_v1_6_alignment_bopt_word16_value2

instance Show SAM_V1_6_Alignment_BOPT_Word16 where
  show :: SAM_V1_6_Alignment_BOPT_Word16 -> String
show (SAM_V1_6_Alignment_BOPT_Word16 Seq Word8
tag
                                       Word8
bopttype
                                       Seq Word16
value
       ) =
    String
"SAM_V1_6_Alignment_BOPT_Word16 { " String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
"tag  = "                           String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Seq Word8 -> String
forall a. Show a => a -> String
show Seq Word8
tag)                          String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , type = "                        String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Word8 -> String
forall a. Show a => a -> String
show Word8
bopttype)                     String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , value = "                       String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Seq Word16 -> String
forall a. Show a => a -> String
show Seq Word16
value)                        String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" }"

-- | cCsS__i__If of the last optional field (type B).
-- See section 1.5 of the [SAM v1.6](http://samtools.github.io/hts-specs/SAMv1.pdf) specification documentation.
data SAM_V1_6_Alignment_BOPT_Int32 = SAM_V1_6_Alignment_BOPT_Int32 { SAM_V1_6_Alignment_BOPT_Int32 -> Seq Word8
sam_v1_6_alignment_bopt_int32_tag   :: Seq Word8
                                                                   , SAM_V1_6_Alignment_BOPT_Int32 -> Word8
sam_v1_6_alignment_bopt_int32_type  :: Word8
                                                                   , SAM_V1_6_Alignment_BOPT_Int32 -> Seq Int32
sam_v1_6_alignment_bopt_int32_value :: Seq Int32
                                                                   }
  deriving ((forall x.
 SAM_V1_6_Alignment_BOPT_Int32
 -> Rep SAM_V1_6_Alignment_BOPT_Int32 x)
-> (forall x.
    Rep SAM_V1_6_Alignment_BOPT_Int32 x
    -> SAM_V1_6_Alignment_BOPT_Int32)
-> Generic SAM_V1_6_Alignment_BOPT_Int32
forall x.
Rep SAM_V1_6_Alignment_BOPT_Int32 x
-> SAM_V1_6_Alignment_BOPT_Int32
forall x.
SAM_V1_6_Alignment_BOPT_Int32
-> Rep SAM_V1_6_Alignment_BOPT_Int32 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SAM_V1_6_Alignment_BOPT_Int32
-> Rep SAM_V1_6_Alignment_BOPT_Int32 x
from :: forall x.
SAM_V1_6_Alignment_BOPT_Int32
-> Rep SAM_V1_6_Alignment_BOPT_Int32 x
$cto :: forall x.
Rep SAM_V1_6_Alignment_BOPT_Int32 x
-> SAM_V1_6_Alignment_BOPT_Int32
to :: forall x.
Rep SAM_V1_6_Alignment_BOPT_Int32 x
-> SAM_V1_6_Alignment_BOPT_Int32
Generic,Typeable)

instance Eq SAM_V1_6_Alignment_BOPT_Int32 where
  SAM_V1_6_Alignment_BOPT_Int32 Seq Word8
sam_v1_6_alignment_bopt_int32_tag1 Word8
sam_v1_6_alignment_bopt_int32_type1 Seq Int32
sam_v1_6_alignment_bopt_int32_value1 == :: SAM_V1_6_Alignment_BOPT_Int32
-> SAM_V1_6_Alignment_BOPT_Int32 -> Bool
== SAM_V1_6_Alignment_BOPT_Int32 Seq Word8
sam_v1_6_alignment_bopt_int32_tag2 Word8
sam_v1_6_alignment_bopt_int32_type2 Seq Int32
sam_v1_6_alignment_bopt_int32_value2 = Seq Word8
sam_v1_6_alignment_bopt_int32_tag1 Seq Word8 -> Seq Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== Seq Word8
sam_v1_6_alignment_bopt_int32_tag2 Bool -> Bool -> Bool
&& Word8
sam_v1_6_alignment_bopt_int32_type1 Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== Word8
sam_v1_6_alignment_bopt_int32_type2 Bool -> Bool -> Bool
&& Seq Int32
sam_v1_6_alignment_bopt_int32_value1 Seq Int32 -> Seq Int32 -> Bool
forall a. Eq a => a -> a -> Bool
== Seq Int32
sam_v1_6_alignment_bopt_int32_value2

instance Show SAM_V1_6_Alignment_BOPT_Int32 where
  show :: SAM_V1_6_Alignment_BOPT_Int32 -> String
show (SAM_V1_6_Alignment_BOPT_Int32 Seq Word8
tag
                                      Word8
bopttype
                                      Seq Int32
value
       ) =
    String
"SAM_V1_6_Alignment_BOPT_Int32 { " String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
"tag  = "                          String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Seq Word8 -> String
forall a. Show a => a -> String
show Seq Word8
tag)                         String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , type = "                       String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Word8 -> String
forall a. Show a => a -> String
show Word8
bopttype)                    String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , value = "                      String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Seq Int32 -> String
forall a. Show a => a -> String
show Seq Int32
value)                       String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" }"

-- | cCsSi__I__f of the last optional field (type B).
-- See section 1.5 of the [SAM v1.6](http://samtools.github.io/hts-specs/SAMv1.pdf) specification documentation.
data SAM_V1_6_Alignment_BOPT_Word32 = SAM_V1_6_Alignment_BOPT_Word32 { SAM_V1_6_Alignment_BOPT_Word32 -> Seq Word8
sam_v1_6_alignment_bopt_word32_tag   :: Seq Word8
                                                                     , SAM_V1_6_Alignment_BOPT_Word32 -> Word8
sam_v1_6_alignment_bopt_word32_type  :: Word8
                                                                     , SAM_V1_6_Alignment_BOPT_Word32 -> Seq Word32
sam_v1_6_alignment_bopt_word32_value :: Seq Word32
                                                                     }
  deriving ((forall x.
 SAM_V1_6_Alignment_BOPT_Word32
 -> Rep SAM_V1_6_Alignment_BOPT_Word32 x)
-> (forall x.
    Rep SAM_V1_6_Alignment_BOPT_Word32 x
    -> SAM_V1_6_Alignment_BOPT_Word32)
-> Generic SAM_V1_6_Alignment_BOPT_Word32
forall x.
Rep SAM_V1_6_Alignment_BOPT_Word32 x
-> SAM_V1_6_Alignment_BOPT_Word32
forall x.
SAM_V1_6_Alignment_BOPT_Word32
-> Rep SAM_V1_6_Alignment_BOPT_Word32 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SAM_V1_6_Alignment_BOPT_Word32
-> Rep SAM_V1_6_Alignment_BOPT_Word32 x
from :: forall x.
SAM_V1_6_Alignment_BOPT_Word32
-> Rep SAM_V1_6_Alignment_BOPT_Word32 x
$cto :: forall x.
Rep SAM_V1_6_Alignment_BOPT_Word32 x
-> SAM_V1_6_Alignment_BOPT_Word32
to :: forall x.
Rep SAM_V1_6_Alignment_BOPT_Word32 x
-> SAM_V1_6_Alignment_BOPT_Word32
Generic,Typeable)

instance Eq SAM_V1_6_Alignment_BOPT_Word32 where
  SAM_V1_6_Alignment_BOPT_Word32 Seq Word8
sam_v1_6_alignment_bopt_word32_tag1 Word8
sam_v1_6_alignment_bopt_word32_type1 Seq Word32
sam_v1_6_alignment_bopt_word32_value1 == :: SAM_V1_6_Alignment_BOPT_Word32
-> SAM_V1_6_Alignment_BOPT_Word32 -> Bool
== SAM_V1_6_Alignment_BOPT_Word32 Seq Word8
sam_v1_6_alignment_bopt_word32_tag2 Word8
sam_v1_6_alignment_bopt_word32_type2 Seq Word32
sam_v1_6_alignment_bopt_word32_value2 = Seq Word8
sam_v1_6_alignment_bopt_word32_tag1 Seq Word8 -> Seq Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== Seq Word8
sam_v1_6_alignment_bopt_word32_tag2 Bool -> Bool -> Bool
&& Word8
sam_v1_6_alignment_bopt_word32_type1 Word8 -> Word8 -> Bool
forall a. Eq a => a -> a -> Bool
== Word8
sam_v1_6_alignment_bopt_word32_type2 Bool -> Bool -> Bool
&& Seq Word32
sam_v1_6_alignment_bopt_word32_value1 Seq Word32 -> Seq Word32 -> Bool
forall a. Eq a => a -> a -> Bool
== Seq Word32
sam_v1_6_alignment_bopt_word32_value2

instance Show SAM_V1_6_Alignment_BOPT_Word32 where
  show :: SAM_V1_6_Alignment_BOPT_Word32 -> String
show (SAM_V1_6_Alignment_BOPT_Word32 Seq Word8
tag
                                       Word8
bopttype
                                       Seq Word32
value
       ) =
    String
"SAM_V1_6_Alignment_BOPT_Word32 { " String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
"tag  = "                           String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Seq Word8 -> String
forall a. Show a => a -> String
show Seq Word8
tag)                          String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , type = "                        String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Word8 -> String
forall a. Show a => a -> String
show Word8
bopttype)                     String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" , value = "                       String -> ShowS
forall a. [a] -> [a] -> [a]
++
    (Seq Word32 -> String
forall a. Show a => a -> String
show Seq Word32
value)                        String -> ShowS
forall a. [a] -> [a] -> [a]
++
    String
" }"