Example #1
0
        /// <summary>
        /// Factory method for implementations of this interface
        /// </summary>
        /// <returns>The expression data.</returns>
        /// <param name="filename">Filename.</param>
        /// <param name="rnaType">Rna type.</param>
        /// <param name="filetype">Filetype.</param>
        /// <param name="annotation">Annotation.</param>
        public static IExpressionData LoadExpressionData(string filename, string rnaType, string filetype, IAnnotation annotation)
        {
            Console.WriteLine("\tLoading expression file " + filename + " ... ");
            IExpressionData data = null;

            if (filetype == "gtf" || filetype == ".gtf")
            {
                data = IUnknown.QueryInterface <IExpressionData>(new GtfExpressionFile(GtfExpressionFile.ExpressionTypeFromString(rnaType), filename, annotation));
            }
            else
            {
                data = IUnknown.QueryInterface <IExpressionData>(new BedExpressionFile(filename, BedFile.BedExpression, annotation));
            }

            Console.WriteLine("\ttranscript count: " + data.Transcripts.Count);
            Console.WriteLine("\tgene count: " + data.Genes.Count);

            return(data);
        }
 public ExpressionDataProxy(GtfExpressionFile data)
 {
     this.data = data;
 }