Write maf file (opposite of read.maf)
1
0
Entering edit mode
11 hours ago
Bine ▴ 90

Good morning,

I was wondering if someone could advise me on the following:

I have read a maf file via

read.maf(path.maf)

then I did some modifications. Now I would like to simply write this maf file again in the same format as a read it. I was looking for a function

write.maf 

but I came only along the funciton write.mafSummary which I feel will modify the file. Any suggestions how I could save it so that afterwards I can simply read it again via read.maf?

Thanks so much!

maf maftools r • 105 views
ADD COMMENT
1
Entering edit mode
6 hours ago
graeme.thorn ▴ 110

A MAF file is just a table with specified columns. Could you not do this via reading it in as a tab-separated text file, performing the manipulation, then writing it out using write.table("updated_file.maf",...)?

ADD COMMENT
0
Entering edit mode

I have moved this from a comment to an answer.

To reiterate MAF is not a format in the classical sense of a novel and complex information structure.

MAF means a tab delimited text format where certain columns have to be present,

hence, the simplest way to modify it is to just read in a tab-delimited, column-based file, modify the column and save it right back with write.table

ADD REPLY

Login before adding your answer.

Traffic: 3631 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6