Question: mapping of drug names of excel sheet and tsv files
0
gravatar for smrutimayipanda
12 weeks ago by
smrutimayipanda10 wrote:

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 • 176 views
ADD COMMENTlink modified 11 weeks ago • written 12 weeks ago by smrutimayipanda10
1

you want linux join.

ADD REPLYlink written 12 weeks ago by Pierre Lindenbaum131k

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 REPLYlink written 12 weeks ago by smrutimayipanda10

enter image description here

ADD REPLYlink written 12 weeks ago by Pierre Lindenbaum131k

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

ADD REPLYlink modified 12 weeks ago • written 12 weeks ago by rpolicastro2.4k

Here is the excel sheet content: Drug PRIVIGEN

content of tsv file: drug chembl id privigen CHEMBL761

ADD REPLYlink written 12 weeks ago by smrutimayipanda10

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 REPLYlink written 12 weeks ago by newbio17310

can anyone please help me?

ADD REPLYlink written 11 weeks ago by smrutimayipanda10
0
gravatar for JC
12 weeks ago by
JC12k
Mexico
JC12k wrote:
  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 COMMENTlink written 12 weeks ago by JC12k

can you please give me the body of the script?

ADD REPLYlink written 12 weeks ago by smrutimayipanda10

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

ADD REPLYlink written 11 weeks ago by JC12k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1698 users visited in the last hour