module Bio.FASTA.Type
( Fasta
, FastaItem (..)
, ParsableFastaToken (..)
, Modification (..)
, ModItem (..)
, modificationToString
) where
import Bio.Sequence (BareSequence)
import Data.Text (Text)
import Data.Void
import GHC.Generics (Generic)
import Text.Megaparsec
type Fasta a = [FastaItem a]
data FastaItem a
= FastaItem
{ forall a. FastaItem a -> Text
name :: Text
, forall a. FastaItem a -> BareSequence a
sequ :: BareSequence a
}
deriving (FastaItem a -> FastaItem a -> Bool
forall a. Eq a => FastaItem a -> FastaItem a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FastaItem a -> FastaItem a -> Bool
$c/= :: forall a. Eq a => FastaItem a -> FastaItem a -> Bool
== :: FastaItem a -> FastaItem a -> Bool
$c== :: forall a. Eq a => FastaItem a -> FastaItem a -> Bool
Eq, FastaItem a -> FastaItem a -> Bool
FastaItem a -> FastaItem a -> Ordering
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall {a}. Ord a => Eq (FastaItem a)
forall a. Ord a => FastaItem a -> FastaItem a -> Bool
forall a. Ord a => FastaItem a -> FastaItem a -> Ordering
forall a. Ord a => FastaItem a -> FastaItem a -> FastaItem a
min :: FastaItem a -> FastaItem a -> FastaItem a
$cmin :: forall a. Ord a => FastaItem a -> FastaItem a -> FastaItem a
max :: FastaItem a -> FastaItem a -> FastaItem a
$cmax :: forall a. Ord a => FastaItem a -> FastaItem a -> FastaItem a
>= :: FastaItem a -> FastaItem a -> Bool
$c>= :: forall a. Ord a => FastaItem a -> FastaItem a -> Bool
> :: FastaItem a -> FastaItem a -> Bool
$c> :: forall a. Ord a => FastaItem a -> FastaItem a -> Bool
<= :: FastaItem a -> FastaItem a -> Bool
$c<= :: forall a. Ord a => FastaItem a -> FastaItem a -> Bool
< :: FastaItem a -> FastaItem a -> Bool
$c< :: forall a. Ord a => FastaItem a -> FastaItem a -> Bool
compare :: FastaItem a -> FastaItem a -> Ordering
$ccompare :: forall a. Ord a => FastaItem a -> FastaItem a -> Ordering
Ord, Int -> FastaItem a -> ShowS
forall a. Show a => Int -> FastaItem a -> ShowS
forall a. Show a => [FastaItem a] -> ShowS
forall a. Show a => FastaItem a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FastaItem a] -> ShowS
$cshowList :: forall a. Show a => [FastaItem a] -> ShowS
show :: FastaItem a -> String
$cshow :: forall a. Show a => FastaItem a -> String
showsPrec :: Int -> FastaItem a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> FastaItem a -> ShowS
Show, forall a b. a -> FastaItem b -> FastaItem a
forall a b. (a -> b) -> FastaItem a -> FastaItem b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: forall a b. a -> FastaItem b -> FastaItem a
$c<$ :: forall a b. a -> FastaItem b -> FastaItem a
fmap :: forall a b. (a -> b) -> FastaItem a -> FastaItem b
$cfmap :: forall a b. (a -> b) -> FastaItem a -> FastaItem b
Functor)
class ParsableFastaToken a where
parseToken :: (Char -> Bool) -> Parsec Void Text a
data ModItem
= Mod Modification
| Letter Char
deriving (ModItem -> ModItem -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModItem -> ModItem -> Bool
$c/= :: ModItem -> ModItem -> Bool
== :: ModItem -> ModItem -> Bool
$c== :: ModItem -> ModItem -> Bool
Eq, Int -> ModItem -> ShowS
[ModItem] -> ShowS
ModItem -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModItem] -> ShowS
$cshowList :: [ModItem] -> ShowS
show :: ModItem -> String
$cshow :: ModItem -> String
showsPrec :: Int -> ModItem -> ShowS
$cshowsPrec :: Int -> ModItem -> ShowS
Show, forall x. Rep ModItem x -> ModItem
forall x. ModItem -> Rep ModItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModItem x -> ModItem
$cfrom :: forall x. ModItem -> Rep ModItem x
Generic)
data Modification
= Mod_A_Star
| Mod_C_Star
| Mod_G_Star
| Mod_T_Star
| Mod_rA
| Mod_rC
| Mod_rG
| Mod_rU
| Mod_Plus_A
| Mod_Plus_C
| Mod_Plus_G
| Mod_Plus_T
| Mod_rAf
| Mod_rCf
| Mod_rGf
| Mod_rUf
| Mod_mA
| Mod_mC
| Mod_mG
| Mod_mU
| Mod_mA_Star
| Mod_mC_Star
| Mod_mG_Star
| Mod_mU_Star
| Mod_dU
| Mod_5Bio
| Mod_iBio
| Mod_56FAM
| Mod_36FAM
| Mod_5HEX
| Mod_5TMR
| Mod_3BHQ1
| Mod_3BHQ2
| Mod_5NH2
| Mod_3NH2
| Mod_5PO4
| Mod_3PO4
| Mod_3BioTEG
| Mod_C12
| Mod_NHSdT
| Mod_5Mal
| Mod_5thio
| Mod_3thio
| Mod_3azide
| Mod_3alkine
| Mod_5CholTEG
| Mod_3CholTEG
| Mod_5C10
| Mod_5Alk
| Mod_GC
| Mod_GT
| Mod_AT
| Mod_TG
| Mod_AC
| Mod_CC
| Mod_AA
| Mod_TC
| Mod_TT
| Mod_CG
| Mod_GG
| Mod_AG
| Mod_GA
| Mod_CA
| Mod_CT
| Mod_TA
| Mod_AAA
| Mod_AAC
| Mod_ACT
| Mod_ATC
| Mod_ATG
| Mod_CAG
| Mod_AGA
| Mod_CAT
| Mod_CCG
| Mod_CGT
| Mod_CTG
| Mod_GAA
| Mod_GAC
| Mod_GCT
| Mod_GGT
| Mod_GTT
| Mod_TAC
| Mod_TCT
| Mod_TGC
| Mod_TGG
| Mod_TTC
| Mod_TTT
| Unknown String
deriving (Modification -> Modification -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Modification -> Modification -> Bool
$c/= :: Modification -> Modification -> Bool
== :: Modification -> Modification -> Bool
$c== :: Modification -> Modification -> Bool
Eq, Int -> Modification -> ShowS
[Modification] -> ShowS
Modification -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Modification] -> ShowS
$cshowList :: [Modification] -> ShowS
show :: Modification -> String
$cshow :: Modification -> String
showsPrec :: Int -> Modification -> ShowS
$cshowsPrec :: Int -> Modification -> ShowS
Show, Eq Modification
Modification -> Modification -> Bool
Modification -> Modification -> Ordering
Modification -> Modification -> Modification
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Modification -> Modification -> Modification
$cmin :: Modification -> Modification -> Modification
max :: Modification -> Modification -> Modification
$cmax :: Modification -> Modification -> Modification
>= :: Modification -> Modification -> Bool
$c>= :: Modification -> Modification -> Bool
> :: Modification -> Modification -> Bool
$c> :: Modification -> Modification -> Bool
<= :: Modification -> Modification -> Bool
$c<= :: Modification -> Modification -> Bool
< :: Modification -> Modification -> Bool
$c< :: Modification -> Modification -> Bool
compare :: Modification -> Modification -> Ordering
$ccompare :: Modification -> Modification -> Ordering
Ord, forall x. Rep Modification x -> Modification
forall x. Modification -> Rep Modification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Modification x -> Modification
$cfrom :: forall x. Modification -> Rep Modification x
Generic)
modificationToString :: Modification -> String
modificationToString :: Modification -> String
modificationToString Modification
Mod_A_Star = String
"[A*]"
modificationToString Modification
Mod_C_Star = String
"[C*]"
modificationToString Modification
Mod_G_Star = String
"[G*]"
modificationToString Modification
Mod_T_Star = String
"[T*]"
modificationToString Modification
Mod_rA = String
"[rA]"
modificationToString Modification
Mod_rC = String
"[rC]"
modificationToString Modification
Mod_rG = String
"[rG]"
modificationToString Modification
Mod_rU = String
"[rU]"
modificationToString Modification
Mod_Plus_A = String
"[+A]"
modificationToString Modification
Mod_Plus_C = String
"[+C]"
modificationToString Modification
Mod_Plus_G = String
"[+G]"
modificationToString Modification
Mod_Plus_T = String
"[+T]"
modificationToString Modification
Mod_rAf = String
"[rAf]"
modificationToString Modification
Mod_rCf = String
"[rCf]"
modificationToString Modification
Mod_rGf = String
"[rGf]"
modificationToString Modification
Mod_rUf = String
"[rUf]"
modificationToString Modification
Mod_mA = String
"[mA]"
modificationToString Modification
Mod_mC = String
"[mC]"
modificationToString Modification
Mod_mG = String
"[mG]"
modificationToString Modification
Mod_mU = String
"[mU]"
modificationToString Modification
Mod_mA_Star = String
"[mA*]"
modificationToString Modification
Mod_mC_Star = String
"[mC*]"
modificationToString Modification
Mod_mG_Star = String
"[mG*]"
modificationToString Modification
Mod_mU_Star = String
"[mU*]"
modificationToString Modification
Mod_dU = String
"[dU]"
modificationToString Modification
Mod_5Bio = String
"[5Bio]"
modificationToString Modification
Mod_iBio = String
"[iBio]"
modificationToString Modification
Mod_56FAM = String
"[56FAM]"
modificationToString Modification
Mod_36FAM = String
"[36FAM]"
modificationToString Modification
Mod_5HEX = String
"[5HEX]"
modificationToString Modification
Mod_5TMR = String
"[5TMR]"
modificationToString Modification
Mod_3BHQ1 = String
"[3BHQ1]"
modificationToString Modification
Mod_3BHQ2 = String
"[3BHQ2]"
modificationToString Modification
Mod_5NH2 = String
"[5NH2]"
modificationToString Modification
Mod_3NH2 = String
"[3NH2]"
modificationToString Modification
Mod_5PO4 = String
"[5PO4]"
modificationToString Modification
Mod_3PO4 = String
"[3PO4]"
modificationToString Modification
Mod_3BioTEG = String
"[3BioTEG]"
modificationToString Modification
Mod_C12 = String
"[C12]"
modificationToString Modification
Mod_NHSdT = String
"[NHSdT]"
modificationToString Modification
Mod_5Mal = String
"[5Mal]"
modificationToString Modification
Mod_5thio = String
"[5thio]"
modificationToString Modification
Mod_3thio = String
"[3thio]"
modificationToString Modification
Mod_3azide = String
"[3azide]"
modificationToString Modification
Mod_3alkine = String
"[3alkine]"
modificationToString Modification
Mod_5CholTEG = String
"[5CholTEG]"
modificationToString Modification
Mod_3CholTEG = String
"[3CholTEG]"
modificationToString Modification
Mod_5C10 = String
"[5C10]"
modificationToString Modification
Mod_5Alk = String
"[5Alk]"
modificationToString Modification
Mod_GC = String
"[GC]"
modificationToString Modification
Mod_GT = String
"[GT]"
modificationToString Modification
Mod_AT = String
"[AT]"
modificationToString Modification
Mod_TG = String
"[TG]"
modificationToString Modification
Mod_AC = String
"[AC]"
modificationToString Modification
Mod_CC = String
"[CC]"
modificationToString Modification
Mod_AA = String
"[AA]"
modificationToString Modification
Mod_TC = String
"[TC]"
modificationToString Modification
Mod_TT = String
"[TT]"
modificationToString Modification
Mod_CG = String
"[CG]"
modificationToString Modification
Mod_GG = String
"[GG]"
modificationToString Modification
Mod_AG = String
"[AG]"
modificationToString Modification
Mod_GA = String
"[GA]"
modificationToString Modification
Mod_CA = String
"[CA]"
modificationToString Modification
Mod_CT = String
"[CT]"
modificationToString Modification
Mod_TA = String
"[TA]"
modificationToString Modification
Mod_AAA = String
"[AAA]"
modificationToString Modification
Mod_AAC = String
"[AAC]"
modificationToString Modification
Mod_ACT = String
"[ACT]"
modificationToString Modification
Mod_ATC = String
"[ATC]"
modificationToString Modification
Mod_ATG = String
"[ATG]"
modificationToString Modification
Mod_CAG = String
"[CAG]"
modificationToString Modification
Mod_AGA = String
"[AGA]"
modificationToString Modification
Mod_CAT = String
"[CAT]"
modificationToString Modification
Mod_CCG = String
"[CCG]"
modificationToString Modification
Mod_CGT = String
"[CGT]"
modificationToString Modification
Mod_CTG = String
"[CTG]"
modificationToString Modification
Mod_GAA = String
"[GAA]"
modificationToString Modification
Mod_GAC = String
"[GAC]"
modificationToString Modification
Mod_GCT = String
"[GCT]"
modificationToString Modification
Mod_GGT = String
"[GGT]"
modificationToString Modification
Mod_GTT = String
"[GTT]"
modificationToString Modification
Mod_TAC = String
"[TAC]"
modificationToString Modification
Mod_TCT = String
"[TCT]"
modificationToString Modification
Mod_TGC = String
"[TGC]"
modificationToString Modification
Mod_TGG = String
"[TGG]"
modificationToString Modification
Mod_TTC = String
"[TTC]"
modificationToString Modification
Mod_TTT = String
"[TTT]"
modificationToString (Unknown String
s) = String
s