You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you were had a GRange that matched a standard modified bed file format like narrowpeak, you could specify the filetype. But rtracklayer only really handles standard formats. I think this makes sense as BED files do not typically have headers, so you need a standardized format to be able to intuit what each column contains.
You can probably guess the work around then for your customized BED file. As we have covered GRanges can be converted into data.frames. Once coerced they can be written out with standard methods to standard formats that will preserve header information:
The issue then becomes reading it back, as it will not go straight into a GRange object again . You could as an alternative write out as a TSV file, and drop the headers. Then import.bed will happily work. But the TSV will not have column information.
For example:
But the resulting bed file doesn't have the "expression" column. Is it possible to keep the metadata columns too?
Thanks!
The text was updated successfully, but these errors were encountered: