csglab / REMBRANDTS

REMoving Bias from Rna-seq ANalysis of Differential Transcript Stability
GNU General Public License v3.0
13 stars 11 forks source link

not able to read in vsd_normalized files #3

Open slukowski opened 7 years ago

slukowski commented 7 years ago

Hi

I'm getting an error when trying to run the script. It is related to the creating of the vsd_normalization files such that R cannot load the files at line 15 exon <- read.csv(paste(tempFolder,"/vsd_normalized.exonic.all.centered.mx.txt",sep=""),sep="\t")

The error itself comes when I'm loading 4 samples (8 files in total: 4 exonic, 4 intronic): Warning message: In read.table(file = file, header = header, sep = sep, quote = quote, : incomplete final line found by readTableHeader on './tmp/miR29_analysis/vsd_normalized.intronic.all.mx.txt'

It seems to be that the file is created without the correct line ending. If I manually add the line ending to the file, R can load it, but the next time I run it, the file is regenerated and the script fails.

I'll try to have a go at a fix, but would appreciate it you have any advice

Thanks

Sam

slukowski commented 7 years ago

I should add that this is on Mac OSX 10.11.6.

slukowski commented 7 years ago

Ok, so in the Rembrandts.sh script on line 38-41, adding a newline (\n) to the echo command seems to fix the warning, but the other error remains. This is an example of what I have changed in the Rembrandts.sh script: echo -n -e "GeneID\t\n" > $tmp_folder/"vsd_normalized.exonic.all.centered.mx.txt"

slukowski commented 7 years ago

ah - now i see that creates a problem later on too. I think its when its trying to write new columns to the file and close it. Back to the drawing board.

slukowski commented 7 years ago

I have it working now. The only thing I did was actually delete the newline '\n' I added, then ran the script over the top of the existing files. Somehow this has fixed it. Maybe it had something to do with needing content in those files to bypass the error?