Пример #1
0
	/// <summary>
	/// Simple constructor
	/// </summary>
	public PSIPIanalysissearchAnalysisSoftwareType(
		string id, string name, string version, string uri, string org_id,
		string contact_accession, string contact_name, string contact_cvRef,
		string customizations ) {
		
		// FuGECommonIdentifiableType
		this.id = id;
		this.name = name;
		
		// FuGECommonProtocolSoftwareType
		FuGECommonAuditContactRoleType contact_role = new FuGECommonAuditContactRoleType();
		FuGECommonAuditContactRoleTypeRole role = new FuGECommonAuditContactRoleTypeRole();
		FuGECommonOntologycvParamType cvParam =
			new FuGECommonOntologycvParamType(contact_name, contact_accession, contact_cvRef);
		role.cvParam = cvParam;
		contact_role.role = role;
		contact_role.Contact_ref = org_id;
		ContactRole = contact_role;
		this.version = version;
		
		// PSIPIanalysissearchAnalysisSoftwareType
		this.Customizations = customizations;
		this.URI = uri;
	}
Пример #2
0
	/// <summary>
	/// Simple constructor
	/// </summary>
	public FuGECollectionProviderType(
		string id, string contact_ref, string accession, string name, string cvRef ) {
		
		// FuGECommonIdentifiableType
		this.id = id;
		//this.name = name;
		
		// FuGECommonAuditContactRoleType
		FuGECommonAuditContactRoleType contact_role = new FuGECommonAuditContactRoleType();
		FuGECommonAuditContactRoleTypeRole role = new FuGECommonAuditContactRoleTypeRole();
		FuGECommonOntologycvParamType cvParam = new FuGECommonOntologycvParamType(name, accession, cvRef);
		role.cvParam = cvParam;
		contact_role.role = role;
		contact_role.Contact_ref = contact_ref;
		ContactRole = contact_role;
		
		//Software_ref = ;
	}
Пример #3
0
        /// <summary>
        /// Save results to a mzIdentML file
        /// </summary>
        public void SaveMzid(
		string mzid,
		string org_id, string org_name,
		string owner_name, string owner_email )
        {
            // Previous file is required for including MS data
            if( m_mzid == null || m_InputFiles.Count > 1 )
            return;

            #region Organization
            FuGECommonAuditOrganizationType org = new FuGECommonAuditOrganizationType();
            org.id = "UPV/EHU";
            org.name = "University of the Basque Country";
            foreach( FuGECommonAuditOrganizationType o in m_mzid.ListOrganizations )
            if( o.id == org.id ) {
                m_mzid.ListOrganizations.Remove( o );
                break;
            }
            m_mzid.ListOrganizations.Add( org );
            #endregion

            #region Software author
            FuGECommonAuditPersonType person = new FuGECommonAuditPersonType();
            person.id = "PAnalyzer_Author";
            person.firstName = "Gorka";
            person.lastName = "Prieto";
            person.email = "*****@*****.**";
            FuGECommonAuditPersonTypeAffiliations aff = new FuGECommonAuditPersonTypeAffiliations();
            aff.Organization_ref = org.id;
            person.affiliations = new FuGECommonAuditPersonTypeAffiliations[]{aff};
            foreach( FuGECommonAuditPersonType p in m_mzid.ListPeople )
            if( p.id == person.id ) {
                m_mzid.ListPeople.Remove( p );
                break;
            }
            m_mzid.ListPeople.Add( person );
            #endregion

            #region Analysis software
            PSIPIanalysissearchAnalysisSoftwareType sw = new PSIPIanalysissearchAnalysisSoftwareType();
            sw.id = m_Software.Name;
            sw.name = m_Software.ToString();
            sw.URI = m_Software.Url;
            sw.version = m_Software.Version;
            ParamType swname = new ParamType();
            FuGECommonOntologycvParamType item = new FuGECommonOntologycvParamType();
            item.name = "PAnalyzer";
            item.cvRef = "PSI-MS";
            item.accession = "MS:1002076";
            swname.Item = item;
            sw.SoftwareName = swname;
            FuGECommonAuditContactRoleType contact = new FuGECommonAuditContactRoleType();
            contact.Contact_ref = person.id;
            FuGECommonAuditContactRoleTypeRole role = new FuGECommonAuditContactRoleTypeRole();
            FuGECommonOntologycvParamType contacttype = new FuGECommonOntologycvParamType();
            contacttype.accession = "MS:1001271";
            contacttype.cvRef = "PSI-MS";
            contacttype.name = "researcher";
            role.cvParam = contacttype;
            contact.role = role;
            sw.ContactRole = contact;
            sw.Customizations = m_Software.Customizations;
            foreach( PSIPIanalysissearchAnalysisSoftwareType s in m_mzid.ListSW )
            if( s.id == m_Software.Name ) {
                m_mzid.ListSW.Remove( sw );
                break;
            }
            m_mzid.ListSW.Add( sw );
            #endregion

            #region Protein detection protocol
            m_mzid.Data.AnalysisCollection.ProteinDetection.ProteinDetectionList_ref = "PDL_PAnalyzer";
            m_mzid.Data.AnalysisCollection.ProteinDetection.ProteinDetectionProtocol_ref = "PDP_PAnalyzer";
            m_mzid.Data.AnalysisProtocolCollection.ProteinDetectionProtocol.AnalysisSoftware_ref = sw.id;
            m_mzid.Data.AnalysisProtocolCollection.ProteinDetectionProtocol.id = "PDP_PAnalyzer";
            #endregion

            #region Protein detection list
            List<PSIPIanalysisprocessProteinAmbiguityGroupType> listGroup =
            new List<PSIPIanalysisprocessProteinAmbiguityGroupType>();
            int hit = 1;
            foreach( Protein p in Proteins ) {
            if( p.Evidence == Protein.EvidenceType.Filtered )
                continue;
            PSIPIanalysisprocessProteinAmbiguityGroupType grp = new PSIPIanalysisprocessProteinAmbiguityGroupType();
            grp.id = "PAG_hit_" + (hit++);
            int num = (p.Subset.Count == 0 ? 1 : p.Subset.Count);
            grp.ProteinDetectionHypothesis = new PSIPIanalysisprocessProteinDetectionHypothesisType[num];
            if( p.Subset.Count == 0 )
                grp.ProteinDetectionHypothesis[0] = BuildHypothesis( p, p.Evidence );
            else {
                int i = 0;
                foreach( Protein p2 in p.Subset )
                    grp.ProteinDetectionHypothesis[i++] = BuildHypothesis( p2, p.Evidence );
            }
            listGroup.Add( grp );
            }
            PSIPIanalysisprocessProteinDetectionListType analysis = new PSIPIanalysisprocessProteinDetectionListType();
            analysis.id = "PDL_PAnalyzer";
               	analysis.ProteinAmbiguityGroup = listGroup.ToArray();
            m_mzid.Data.DataCollection.AnalysisData.ProteinDetectionList = analysis;
            #endregion

            m_mzid.Save( mzid );
            Notify( "Saved to " + mzid );
        }