wiki:HyperTable/BioInfo_Project

Version 2 (modified by sunny, 16 years ago) (diff)

--

Hypertable應用於BioInfo Project

背景資料

應用說明

  • 以陽明的病人屬性分類資料為範本來建立搜尋引擎
    • 參考資料:
    • 匯入方式:
      將陽明的病人屬性分類資料(XML格式),轉換成Hypertable可批次讀取的TSV格式,再使用HQL指令載入到Hypertable當中
    • 匯出方式:
      使用HQL指令匯出TSV檔案
    • 搜尋方式:
      目前Hypertable只提供以Rowkey完全比對及Rowkey或Timestamp的區間比對,以陽明的範例為例:
      Source是指檢查之前診斷判定的病因;
      Primary Site是指檢查之後診斷判定的病因;
      如果用Source為Rowkey來搜尋"Breast",搜尋結果會查出所有Source為"Breast"的資料
      如果用Primary Site為Rowkey來搜尋"Breast",搜尋結果會查出所有Primary Site為"Breast"的資料
      • NOTE: 交互比對的部份,Hypertable目前似乎沒提供,這個有可能要另外的程式再來處理過

資料表建置

  • 編輯資料表綱要
    $ vim gse.hql
    CREATE TABLE GSEFamily (
      'Sample-iid',
      'Supplementary-Data',
      Description
    );
    
  • 建立GSEFamily資料表
    $ hypertable --batch < gse.hql
    
  • 透過轉檔程式產生GSEFamily.tsv
    • 轉檔程式(windows)
      C:\> GSEXmlParser.exe -f tsv -i GSE2109_family.xml -o GSEFamily.tsv
      
  • 匯入資料到GSEFamily資料表
    $ load data infile "GSEFamily.tsv" into table GSEFamily;
    
  • 以Hql Command模式登入hypertable
    $ hypertable
    
  • 搜尋資料
    hypertable> select * from GSEFamily;
    hypertable> select "Supplementary-Data" from GSEFamily;
    hypertable> select "Sample-iid" from GSEFamily;
    hypertable> select "Description" from GSEFamily;
    
  • 刪除資料
    hypertable> delete * from GSEFamily where ROW="Breast";
    

Hadoop整合