This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Merging the filename with tsv files for master file

Hi all,

I have a query. I have a file named as hCoV-19_USA_TN-SPHL-2527_2022_orf.tsv and merged.tsv in the same folder. I want to take the filename for eg, hCoV-19_USA_TN-SPHL-2527_2022 from orf.tsv file and add it to same merged.tsv file which are present in the same folder as column named as Virus_name. Can anyone please let me know how to do it? I tried using python but it is not giving me the correct output. Input: hCoV-19_USA_TN-SPHL-2527_2022_orf.tsv -> hCoV-19_USA_TN-SPHL-2527_2022

Output: merged.tsv -> hCoV-19_USA_TN-SPHL-2527_2022 - Virus_name as column and print as per the number of rows

Please help me regarding this.

genomics

Could you add samples from your files and your expected output.

0 answers

No answers yet.

Log in to answer this question.