@files( ((PARAMS["filename_expression_wang"], "expression_wang.import"), ) )
def importExpressionWang( infile, outfile ):
    '''import gene expression data from Wang et al. (2005) 
    
    :pmid:`16002434`
    '''

    headers = (
        ("Probe Set ID", "probeset"),
        ("Accession", "accession"),
        ("Chromosomal Location", "chromosome"),
        ("Gene Title", "genetitle"),
        ("Gene Symbol", "genesymbol"),
        ("Entrez Gene", "entrezgene"),
        ("Score", "score"),
        ("Q-value", "qvalue"),
        ("Gene Symbol (May2005)", "genesymbol1"),
        ("Entrez Gene (May 2005)", "entrezgene1"),
        ("Unigene (Release # 184)", "unigene",),
        ("DR3 cons.","d3_cons" ),
        ("DR3 1 mism.","d3_mismatch",),
        ("ER6 cons.", "er6_cons"), )

    old_headers = set( [x[0] for x in headers] )
    new_headers = [x[1] for x in headers]
    take = []
    outs = P.getTempFile()
    first = True

    reader = csv.reader( open(infile,"rU") )
    for row in reader:
        if first:
            first = False
            for x, old_header in enumerate(row ):
                if old_headers in old_header: take.append( x )
            outs.write("\t".join(new_headers)+ "\n")
        else:
            new_row = []
            for x in take:
                if row[x].strip() != "---":
                    new_row.append(row[x].strip())
                else:
                    new_row.append("")
            outs.write("\t".join( new_row )+ "\n")
            
    outs.close()
    tmpname = outs.name
    tablename = outfile[:-len(".import")]

    statement = '''
   python %(scriptsdir)s/csv2db.py %(csv2db_options)s \
              --index=probeset \
              --index=genesymbol \
              --table=%(tablename)s \
    < %(tmpname)s > %(outfile)s
    '''
    P.run()

    os.unlink( tmpname )

###################################################################
###################################################################
###################################################################
## import data from Wang et. al
###################################################################
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_vitaminD.py/importExpressionWang/swapped operands of `in`