コード例 #1
0
        public static ProproteinInterfaceSpreadsheetRecord Header()
        {
            var header = new ProproteinInterfaceSpreadsheetRecord
            {
                MotifName              = "Motif Name",
                MotifSource            = "Motif Source",
                TotalFound             = "Total Found",
                Direction              = "Direction",
                ProteinInterfaceLength = "ProteinInterface Length",

                MotifAminoAcids               = "Amino Acids Motif",
                MotifInteractionAminoAcids    = "Interaction Amino Acids Motif",
                MotifNonInteractionAminoAcids = "Non Interaction Amino Acids Motif",

                MotifPhysicochemical               = "Physicochemical Motif",
                MotifInteractionPhysicochemical    = "Interaction Physicochemical Motif",
                MotifNonInteractionPhysicochemical = "Non Interaction Physicochemical Motif",

                MotifHydrophobicity               = "Hydrophobicity Motif",
                MotifInteractionHydrophobicity    = "Interaction Hydrophobicity Motif",
                MotifNonInteractionHydrophobicity = "Non Interaction Hydrophobicity Motif",

                MotifPdbSum               = "PDBsum Motif",
                MotifInteractionPdbSum    = "Interaction PDBsum Motif",
                MotifNonInteractionPdbSum = "Non Interaction PDBsum Motif",

                MotifUniProtKb               = "UniProtKb Motif",
                MotifInteractionUniProtKb    = "Interaction UniProtKb Motif",
                MotifNonInteractionUniProtKb = "Non Interaction UniProtKb Motif",
            };

            for (var index = header.MotifCommonProperties.Length - 1; index >= 6; index--)
            {
                header.MotifCommonProperties[index] = "Common Properties " + (index + 1) + " / " + header.MotifCommonProperties.Length;
            }

            for (var index = header.MotifInteractionsCommonProperties.Length - 1; index >= 6; index--)
            {
                header.MotifInteractionsCommonProperties[index] = "Interaction Common Properties " + (index + 1) + " / " + header.MotifInteractionsCommonProperties.Length;
            }

            for (var index = header.MotifNonInteractionsCommonProperties.Length - 1; index >= 6; index--)
            {
                header.MotifNonInteractionsCommonProperties[index] = "Non Interaction Common Properties " + (index + 1) + " / " + header.MotifNonInteractionsCommonProperties.Length;
            }

            return(header);
        }
コード例 #2
0
        public static ProproteinInterfaceSpreadsheetRecord Record(List <VectorProteinInterfaceWhole> vectorProteinInterfaceWholeList)
        {
            if (vectorProteinInterfaceWholeList == null || vectorProteinInterfaceWholeList.Count == 0)
            {
                return(null);
            }

            var proteinInterfaceSequenceList               = vectorProteinInterfaceWholeList.Select(a => a.ProteinInterfaceAminoAcids1L()).ToList();
            var proteinInterfaceInteractionSequenceList    = vectorProteinInterfaceWholeList.Select(a => string.Join("", a.ProteinInterfaceAminoAcids1L().Select((b, i) => a.InteractionBools()[i] ? b : ' ').ToList())).ToList();
            var proteinInterfaceNonInteractionSequenceList = vectorProteinInterfaceWholeList.Select(a => string.Join("", a.ProteinInterfaceAminoAcids1L().Select((b, i) => !a.InteractionBools()[i] ? b : ' ').ToList())).ToList();


            var distinctProteinInterfaceLengths = vectorProteinInterfaceWholeList.Select(a => a.ProteinInterfaceLength).Distinct().ToArray();

            var directionFwd = vectorProteinInterfaceWholeList.Count(a => !a.ReversedSequence);
            var directionRev = vectorProteinInterfaceWholeList.Count - directionFwd;

            string direction = "";

            if (directionFwd > 0 && directionRev == 0)
            {
                direction = "Fwd";
            }
            else if (directionFwd == 0 && directionRev > 0)
            {
                direction = "Rev";
            }
            else
            {
                direction = "Mix";
            }

            var record = new ProproteinInterfaceSpreadsheetRecord
            {
                MotifName              = "",
                MotifSource            = "",
                TotalFound             = "" + vectorProteinInterfaceWholeList.Count,
                Direction              = direction,
                ProteinInterfaceLength = "" + string.Join(", ", distinctProteinInterfaceLengths),

                MotifAminoAcids               = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidMotif(proteinInterfaceSequenceList),
                MotifInteractionAminoAcids    = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidMotif(proteinInterfaceInteractionSequenceList),
                MotifNonInteractionAminoAcids = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidMotif(proteinInterfaceNonInteractionSequenceList),

                MotifPhysicochemical               = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidGroupMotif(AminoAcidGroups.AminoAcidGroups.EnumAminoAcidGroups.Physicochemical, proteinInterfaceSequenceList),
                MotifInteractionPhysicochemical    = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidGroupMotif(AminoAcidGroups.AminoAcidGroups.EnumAminoAcidGroups.Physicochemical, proteinInterfaceInteractionSequenceList),
                MotifNonInteractionPhysicochemical = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidGroupMotif(AminoAcidGroups.AminoAcidGroups.EnumAminoAcidGroups.Physicochemical, proteinInterfaceNonInteractionSequenceList),

                MotifHydrophobicity               = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidGroupMotif(AminoAcidGroups.AminoAcidGroups.EnumAminoAcidGroups.Hydrophobicity, proteinInterfaceSequenceList),
                MotifInteractionHydrophobicity    = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidGroupMotif(AminoAcidGroups.AminoAcidGroups.EnumAminoAcidGroups.Hydrophobicity, proteinInterfaceInteractionSequenceList),
                MotifNonInteractionHydrophobicity = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidGroupMotif(AminoAcidGroups.AminoAcidGroups.EnumAminoAcidGroups.Hydrophobicity, proteinInterfaceNonInteractionSequenceList),

                MotifPdbSum               = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidGroupMotif(AminoAcidGroups.AminoAcidGroups.EnumAminoAcidGroups.PdbSum, proteinInterfaceSequenceList),
                MotifInteractionPdbSum    = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidGroupMotif(AminoAcidGroups.AminoAcidGroups.EnumAminoAcidGroups.PdbSum, proteinInterfaceInteractionSequenceList),
                MotifNonInteractionPdbSum = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidGroupMotif(AminoAcidGroups.AminoAcidGroups.EnumAminoAcidGroups.PdbSum, proteinInterfaceNonInteractionSequenceList),

                MotifUniProtKb               = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidGroupMotif(AminoAcidGroups.AminoAcidGroups.EnumAminoAcidGroups.UniProtKb, proteinInterfaceSequenceList),
                MotifInteractionUniProtKb    = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidGroupMotif(AminoAcidGroups.AminoAcidGroups.EnumAminoAcidGroups.UniProtKb, proteinInterfaceInteractionSequenceList),
                MotifNonInteractionUniProtKb = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidGroupMotif(AminoAcidGroups.AminoAcidGroups.EnumAminoAcidGroups.UniProtKb, proteinInterfaceNonInteractionSequenceList),
            };


            for (var index = record.MotifCommonProperties.Length - 1; index >= 6; index--)
            {
                record.MotifCommonProperties[index]                = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidCommonPropertiesMotif(proteinInterfaceSequenceList, AminoAcidPropertyMatchType.MininumMatch, index + 1);
                record.MotifInteractionsCommonProperties[index]    = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidCommonPropertiesMotif(proteinInterfaceInteractionSequenceList, AminoAcidPropertyMatchType.MininumMatch, index + 1);
                record.MotifNonInteractionsCommonProperties[index] = ProproteinInterfaceMotif.FindProteinInterfaceAminoAcidCommonPropertiesMotif(proteinInterfaceNonInteractionSequenceList, AminoAcidPropertyMatchType.MininumMatch, index + 1);
            }

            return(record);
        }