I want to run linear models in R using salmon output using the
TPM values (dependent variable) to check for a possible regression relationship with another independent variable.
I used to import:
dir <- "path of salmon output directory" list.files(dir)
It lists following salmon output files:
"SRR593_transcripts" "SRR594_transcripts" "SRR595_transcripts" "SRR596_transcripts" "SRR597_transcripts" "SRR598_transcripts" "SRR599_transcripts" "SRR600_transcripts"
Then I loaded the file for independent variable which looks like:
sample dose SRR593 0.067 SRR594 0.563 SRR595 4.789 SRR596 10.12 SRR597 12.67 SRR598 0.783 SRR599 5.465 SRR600 6.234
Then to perform linear regression, I want to access TPM values from transcript quant.sf files to do:
model <- lm(TPM ~ dose)
I need help to perform the linear regression part. Thank you in advance!