mapping of drug names of excel sheet and tsv files
1
0
Entering edit mode
4.2 years ago

I have an excel sheet in which two sheets are available. I want the 2nd sheet to be compared with my drug tsv file. My 2nd sheet consists of drug names which i want to map with drug names of drug tsv file and print the drug ID from drug tsv file. As I am new to python, I ant understand how to write it in python. Please help me regarding this.

python • 1.9k views
ADD COMMENT
1
Entering edit mode
ADD REPLY
0
Entering edit mode

but it can join those files which are of same format.....not xlsx and tsv format. I need a script which can map both xlsx and tsv formats.

ADD REPLY
0
Entering edit mode

enter image description here

ADD REPLY
0
Entering edit mode

Can you add the first few lines of both files to the post?

ADD REPLY
0
Entering edit mode

Here is the excel sheet content: Drug PRIVIGEN

content of tsv file: drug chembl id privigen CHEMBL761

ADD REPLY
0
Entering edit mode

If it's something that needs to be done only once, you could just export 2nd sheet of the Excel document and perform mapping afterwards.

ADD REPLY
0
Entering edit mode

can anyone please help me?

ADD REPLY
0
Entering edit mode
4.2 years ago
JC 13k
  1. you need some library to read the Excel, check https://www.geeksforgeeks.org/reading-excel-file-using-python/
  2. Read the TSV file, load it in a List
  3. Open the Excel, read the drug name and ID, if the name is in your list, print the info
ADD COMMENT
0
Entering edit mode

can you please give me the body of the script?

ADD REPLY
0
Entering edit mode

it's hard to code without seeing the input data format

ADD REPLY

Login before adding your answer.

Traffic: 2253 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6