Hi,
I have two different *.csv files with different column headers except one column, i.e, one with the gene symbols and expression data (samples), and the other with the gene symbols and phenotypic data/attributes, in both the files, one column (gene symbols) is same. I would like to merge both the files based on mapping with the gene symbol column and save all the data in one file for further data analysis. I would like to know how this could be done.
Thank you,
Toufiq
1 answer
This can be done in the terminal with the join utility (sort the files on gene symbol first), e.g. join -a1 -a2 file1.csv file2.csv
The -a option is used to keep unpairable lines from the corresponding file, i.e. in case a gene symbol is in one file but not the other.
Log in to answer this question.
Have you read the help page of the merge function?
Thank you so much. @Benn
Cross-posted: https://support.bioconductor.org/p/124514