Ejemplo n.º 1
0
def parser():
    '''
    Creates the csv and the json
    '''

    dataToWrite = []

    for index, row in dataFrame.iterrows():

        content = OrderedDict(row)

        tmpRes = JsonManager.createData(content)

        dataFrame.at[index, 'Detector'] = rm.removeMiRNAIdentifier(
            dataFrame.at[index, "Detector"])

        dataToWrite.append(tmpRes)

    JsonManager.writeJSON(dataToWrite, file)

    (dataFrame.fillna(0)).to_csv("./data/result.csv", header=None)
Ejemplo n.º 2
0
def parser():

    '''
    Creates the csv and the json
    '''

    dataToWrite = []

    for index, row in dataFrame.iterrows():

        content = OrderedDict(row)

        tmpRes = JsonManager.createData(content)

        dataFrame.at[index,'Detector'] = rm.removeMiRNAIdentifier(dataFrame.at[index, "Detector"])

        dataToWrite.append(tmpRes)

    JsonManager.writeJSON(dataToWrite, file)

    (dataFrame.fillna(0)).to_csv("./data/result.csv", header=None)
Ejemplo n.º 3
0
    writer = csv.writer(file)

    for elementName in miRNAList:
        genes = searchForTarget(elementName)
        genes.insert(0, elementName)
        if len(genes) > 1:
            writer.writerow(genes)

    file.close()


"""
    The following is the main class of the software. It is used to open a dataset written in an excel file
"""

filesPath, file = JsonManager.initPath('results')

# Open DataSet
datasetFilename = filesPath + 'Dati HF-LF_3_6_12 mesi.xlsx'
# Local Section
localDBFilename = filesPath + 'localDB.xls'

dataFrame = getDataFrameFromExcel(datasetFilename, 'Sheet1')
dataFrame.loc[:, 'Targets'] = 'Waiting'

localDF = getDataFrameFromExcel(localDBFilename, 'miRTarBase')

# Creates a dataframe containing only the miRNA under consideration
miRNAList = getMiRNAList()

# Obtains the data frame including the miRNAs
Ejemplo n.º 4
0
    file = open('./data/resTarget.csv', 'w', newline="")
    writer = csv.writer(file)

    for elementName in miRNAList:
        genes = searchForTarget(elementName)
        genes.insert(0, elementName)
        if len(genes) > 1:
            writer.writerow(genes)

    file.close()

"""
    The following is the main class of the software. It is used to open a dataset written in an excel file
"""

filesPath, file = JsonManager.initPath('results')

# Open DataSet
datasetFilename = filesPath + 'Dati HF-LF_3_6_12 mesi.xlsx'
# Local Section
localDBFilename = filesPath + 'localDB.xls'

dataFrame = getDataFrameFromExcel(datasetFilename, 'Sheet1')
dataFrame.loc[:, 'Targets'] = 'Waiting'

localDF = getDataFrameFromExcel(localDBFilename, 'miRTarBase')

# Creates a dataframe containing only the miRNA under consideration
miRNAList = getMiRNAList()

# Obtains the data frame including the miRNAs