I am very new to perl programming and need help:
I have a spreadsheet with multiple columns and I am interested in extracting data from just 3 columns.
Column A has gene names
Column B has a sample id
Column C has a characteristic of the sample.
I want for each unique value in column A to print the sample IDs (columnB) that match that gene name and the associated characteristic (columnC)
Example:
Column A Column B Column C
gene1 1T pink
gene1 6T blue
gene2 4T green
gene2 4T green
gene2 2T pink
gene3 1T pink
output to be a tab delimitated text file
gene 1 2 pink,blue
gene2 2 green,pink
gene3 1 pink
I have a spreadsheet with multiple columns and I am interested in extracting data from just 3 columns.
Column A has gene names
Column B has a sample id
Column C has a characteristic of the sample.
I want for each unique value in column A to print the sample IDs (columnB) that match that gene name and the associated characteristic (columnC)
Example:
Column A Column B Column C
gene1 1T pink
gene1 6T blue
gene2 4T green
gene2 4T green
gene2 2T pink
gene3 1T pink
output to be a tab delimitated text file
gene 1 2 pink,blue
gene2 2 green,pink
gene3 1 pink
Comment