public PairwaiseModule(IPairwiseSequenceProvider provider)
        {
            _provider = provider;

            Post["/Align/Pairwise/Metadata"] = _ =>
            {
                var data = (SequenceModel[])NancyExtensionToPost.GetData <SequenceModel[]>(Request.Query);
                return(Response.AsJson(_provider.GetMetadata(data)));
            };
        }
Пример #2
0
        public NucmerModule(INucmerAlignerProvider provider)
        {
            _provider = provider;

            Post["/Align/Nucmer/Standard/{minimum}/"] = _ =>
            {
                var data = (SequenceModel[])NancyExtensionToPost.GetData <SequenceModel[]>(Request.Query);
                return(Response.AsJson(_provider.AlignSequences(data)));
            };

            Post["/Align/Nucmer/Simple/{minimum}/"] = _ =>
            {
                var data = (SequenceModel[])NancyExtensionToPost.GetData <SequenceModel[]>(Request.Query);
                return(Response.AsJson(_provider.AlignSequencesSimple(data)));
            };
        }
Пример #3
0
        public DeltaModule(IDeltaProvider provider)
        {
            _provider = provider;

            Post["/Align/Delta/Delta"] = _ =>
            {
                var data = (SequenceModel[])NancyExtensionToPost.GetData <SequenceModel[]>(Request.Query);
                return(Response.AsJson(_provider.GetDeltas(data)));
            };

            Post["/Align/Delta/IsReverse"] = _ =>
            {
                var data = (SequenceModel[])NancyExtensionToPost.GetData <SequenceModel[]>(Request.Query);
                return(Response.AsJson(_provider.IsReverseQueryDirection(data)));
            };
        }
Пример #4
0
        public NeedlemanModule(INeedlemanWunschAlignerProvider provider)
        {
            _provider = provider;

            Post["/Align/Needleman/Standard"] = _ =>
            {
                var data = (SequenceModel[])NancyExtensionToPost.GetData <SequenceModel[]>(Request.Query);
                return(Response.AsJson(_provider.AlignSequences(data)));
            };

            Post["/Align/Needleman/Simple"] = _ =>
            {
                var data = (SequenceModel[])NancyExtensionToPost.GetData <SequenceModel[]>(Request.Query);
                return(Response.AsJson(_provider.AlignSequencesSimple(data)));
            };
        }
Пример #5
0
        public ClusterModule(IClusterProvider provider)
        {
            _provider = provider;

            Post["/Align/Cluster/Match"] = _ =>
            {
                var data = (Match[])NancyExtensionToPost.GetData <Match[]>(Request.Query);
                return(Response.AsJson(_provider.GetMatches(data)));
            };

            Post["/Align/Cluster/IsReverse"] = _ =>
            {
                var data = (Match[])NancyExtensionToPost.GetData <Match[]>(Request.Query);
                return(Response.AsJson(_provider.IsReverseQueryDirection(data)));
            };
        }