如何获取100个样本,每个样本的长度为1000个5位单体的比例,即AATAA

问题描述

我对R陌生。请您能帮忙吗?

我需要计算作为AATAA的5个单体的样品比例的平均值。但要从NC_006620.3的前100,000个核苷酸中获取100个样品,每个样品的长度为1000个5聚体(AATAA)的比例,长度为

public void sendUpdate(Int64 newSysChangeVersion,int resortId,string roomType,int avail,DateTime frodte,DateTime todte,Decimal price,int noofRatePackages,Int32 InventoryPushSubscriptionId,Int64 newLastSysChangeVersion)
    {
        try
        {
            GBBWS.InvServices.UpdateratePackagesOperationResponse ores;
            using (sqlConnection conn = new sqlConnection(connStr))
            {
                conn.open();
                ChannelManagerAccount account = new ChannelManagerAccount();
                account.GlobalUsername = "xxxxxxxx";
                account.GlobalPassword = "xxxxxx";
                long resoId = GetResResort(resortId);
                account.HotelId = resoId;
                account.HotelAuthenticationKey = GenerateHotelAuthenticationKey(account);
                GBBWS.InvServices.UpdateratePackagesRequest request = new GBBWS.InvServices.UpdateratePackagesRequest();
                request.HotelAuthenticationKey = account.HotelAuthenticationKey;
                request.ChannelManagerUsername = account.GlobalUsername;
                request.ChannelManagerPassword = account.GlobalPassword;
                request.HotelId = account.HotelId;
                GBBWS.InvServices.UpdateratePackageRequest[] RatePackages = new GBBWS.InvServices.UpdateratePackageRequest[noofRatePackages];
                request.RatePackages = new GBBWS.InvServices.UpdateratePackageRequest[noofRatePackages];
                request.RatePackages = RatePackages;
                for (int ratePackageIndex = 0; ratePackageIndex < RatePackages.Length; ratePackageIndex++)
                {
                    UpdateratePackageRequest rp = new GBBWS.InvServices.UpdateratePackageRequest();
                    request.RatePackages[ratePackageIndex] = rp;
                    long RatepackID = GetResRooms(resortId,roomType);
                    rp.RatePackageId = RatepackID;
                    rp.Rates = new GBBWS.InvServices.RateDetails[noofRatePackages];
                    for (int rpIndex = 0; rpIndex < rp.Rates.Length; rpIndex++)
                    {
                        RateDetails rd = new GBBWS.InvServices.RateDetails();
                        rp.Rates[rpIndex] = rd;
                        rd.Availability = avail;
                        rd.AvailabilityApplicationType = GBBWS.InvServices.AvailabilityApplicationType.SET;
                        rd.FromDate = frodte;
                        rd.ToDate = todte;
                        rd.Rate = price;
                        rd.RateApplicationType = GBBWS.InvServices.RateApplicationType.SET;
                    }
                }
                GBBWS.InvServices.InventoryServiceClient isc = new GBBWS.InvServices.InventoryServiceClient();
                ores = isc.UpdateratePackages(request);
                using (sqlCommand ucmd = new sqlCommand("Res_invpush_UpdateInventoryPushSubscriptionLastSysChangeVersion",conn))
                {
                    ucmd.CommandType = CommandType.StoredProcedure;
                    sqlParameter SubscriptionId = new sqlParameter("@InventoryPushSubscriptionId",sqlDbType.Int);
                    SubscriptionId.Value = InventoryPushSubscriptionId;
                    sqlParameter LastChange = new sqlParameter("@NewLastSysChangeVersion",sqlDbType.BigInt);
                    LastChange.Value = newLastSysChangeVersion;
                    ucmd.Parameters.Add(SubscriptionId);
                    ucmd.Parameters.Add(LastChange);
                    ucmd.ExecuteNonQuery();
                }

            }
        }
        catch (Exception ex)
        {
            //this.WritetoFile("GBB Service Error on timer: {0} " + ex.Message + ex.StackTrace);
            eventLog1.WriteEntry("Error Sending update on Inventory" + ex.Message + ex.StackTrace);
        }
        }

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)