I have a table in which the header is the sample list and the first column is the gene list, and the rest is expression values for each gene in each sample. I want to add a pseudocount of 1 to all values, and I currently do it as such:
cat <(head -n 1 TPM/QuickTest_Dataset.table) \
<(tail -n +2 TPM/QuickTest_Dataset.table | awk '{print $1, $2+1, $3+1, $4+1, $5+1, $6+1, $7+1, $8+1, $9+1, $10+1, $11+1, $12+1, $13+1, $14+1, $15+1, $16+1, $17+1, $18+1, $19+1, $20+1, $21+1}' | sed 's, ,\t,g') > StringTie-TPM_Homo_sapiens_GRCh38.Exp9-PMacrophageM1.protein_coding.table
However, the amount of samples isn't always 20 (amount of columns isn't always 21), sometimes more sometimes less and I have to manually adjust it each time.
Is there a simpler way?