コード例 #1
0
ファイル: WindowMain.cs プロジェクト: OliverCardiff/Renoo
        protected void OnFkpmLoad(object sender, EventArgs e)
        {
            if (MainData.FPKMFileNames.Count > 0)
            {
                List <PreSampleDefinition> prels = new List <PreSampleDefinition> ();

                foreach (string st in MainData.FPKMFileNames)
                {
                    List <string> cols = null;
                    FKPM.GetSampleNames(st, out cols);
                    int cnt = 0;
                    foreach (string ss in cols)
                    {
                        PreSampleDefinition pef = new PreSampleDefinition(SampleType.Expr);
                        pef.singleFName    = st;
                        pef.singleColID    = ss;
                        pef.singleColIndex = cnt + 9;
                        pef.IsGenotyped    = false;
                        pef.TotalColumns   = cols.Count;
                        prels.Add(pef);
                        cnt += 4;
                    }
                }

                SampleAllocationWindow swind = new SampleAllocationWindow(prels);

                swind.ShowAll();
            }
            else
            {
                MainData.ShowMessageWindow("You need to add some files to load first!", false);
            }
        }
コード例 #2
0
ファイル: WindowMain.cs プロジェクト: OliverCardiff/Renoo
        protected void OnVcfLoad(object sender, EventArgs e)
        {
            if (MainData.VariantFileNames.Count > 0)
            {
                List <PreSampleDefinition> prels = new List <PreSampleDefinition> ();

                foreach (string st in MainData.VariantFileNames)
                {
                    List <string> cols = null;

                    if (Variant.IsGenotyped(st, ref cols))
                    {
                        int cnt = 0;
                        foreach (string ss in cols)
                        {
                            PreSampleDefinition pef = new PreSampleDefinition(SampleType.Vcf);
                            pef.singleFName    = st;
                            pef.singleColID    = ss;
                            pef.singleColIndex = cnt + 9;
                            pef.IsGenotyped    = true;
                            pef.TotalColumns   = cols.Count;
                            prels.Add(pef);
                            cnt++;
                        }
                    }
                    else
                    {
                        PreSampleDefinition pef = new PreSampleDefinition(SampleType.Vcf);
                        pef.singleFName  = st;
                        pef.IsGenotyped  = false;
                        pef.TotalColumns = 0;
                        prels.Add(pef);
                    }
                }

                SampleAllocationWindow swind = new SampleAllocationWindow(prels);

                swind.ShowAll();
            }
            else
            {
                MainData.ShowMessageWindow("You need to add some files to load first!", false);
            }
        }
コード例 #3
0
ファイル: WindowMain.cs プロジェクト: OliverCardiff/Renoo
        protected void OnBamLoad(object sender, EventArgs e)
        {
            if (MainData.BAMFileNames.Count > 0)
            {
                List <PreSampleDefinition> prels = new List <PreSampleDefinition> ();

                foreach (string st in MainData.BAMFileNames)
                {
                    PreSampleDefinition pef = new PreSampleDefinition(SampleType.BAM);
                    pef.singleFName = st;
                    prels.Add(pef);
                }

                SampleAllocationWindow swind = new SampleAllocationWindow(prels);

                swind.ShowAll();
            }
            else
            {
                MainData.ShowMessageWindow("You need to add some files to load first!", false);
            }
        }