Hi Guys,
I have a list of genes and their RPMs for some samples (bed file) and wanna merge all genes and their RPMs from bed files into one new bed file (for differential expression analysis). Can anybody please give me a python script to do it?
Really thanks
Please reply an answer by clicking
ADD COMMENT
below the answer.csvtk join
supports joining 2+ files.If you have more columns, you can firstly retrieve the columns gene_id and value to a separated files, and then join.
Does the file has column names? If so, you can
cut
by column names (i.e., GENE, VALUE..), if not, switch flag-H
on and use column fields (i.e., 1, 2...)Then join:
Thanks do much shenwei356. When I run the first script it retrieve only fist line of the field 1,2. seems like it doesn't do any loop ??