I have 176 .tsv
files as a result of a gene alignment looking like these:
target_id | length | tpm |
---|---|---|
ENST0001 | 12 | 100 |
ENST0001 | 9 | 5 |
In these files, I expect a certain overlap between target_id
columns but not complete, so I would like to do a full join and keep all rows. Additionally, I am interested in keeping only the tpm values of each file and rename the column according to the file name.
The expected dataframe would be something similar to:
target_id | SRR100001 | SRR100002 |
---|---|---|
ENST0001 | 100 | 7 |
ENST00015 | 5 | 0 |
I am aware of the join
function in bash, but it can be used for two files per time and if I understood correctly I cannot select specific columns...
Thank you in advance!
EDIT: The files are named as SRR*.tsv