On Sun, Mar 25, 2012 at 10:25 AM, Tim Triche, Jr. <tim.triche@gmail.com>wrote:

> On Sat, Mar 24, 2012 at 5:40 AM, Michael Lawrence <
> lawrence.michael@gene.com> wrote:
>>
>> Would you please provide a little more detail? What goes wrong?
>>
>
> Hmm.  Have you changed something recently?  It used to grind away for a
> long time and then return an empty RangedData, but now if I symlink:
>
> R> foo = unlist(import('CD36.H3K4me3.vstep.wig', asRangedData=FALSE))
> R> foo
> GRanges with 668730 ranges and 1 elementMetadata col:
>                 seqnames               ranges strand   |     score
>                    <Rle>            <IRanges>  <Rle>   | <numeric>
>         R Track     chr1     [ 55801,  56000]      *   |         1
>        R Track1     chr1     [521001, 521200]      *   |         1
>        R Track2     chr1     [554401, 554600]      *   |         1
>        R Track3     chr1     [559801, 560000]      *   |         1
>        R Track4     chr1     [702601, 702800]      *   |         1
>        R Track5     chr1     [703001, 703200]      *   |         1
>        R Track6     chr1     [703201, 703400]      *   |         3
>        R Track7     chr1     [703401, 703600]      *   |         3
>        R Track8     chr1     [703601, 703800]      *   |        23
>             ...      ...                  ...    ... ...       ...
>
> Well that's pretty cool!  I don't know if you made this change recently
> but if so, thanks!
>
>

I recently checked in a major overall of rtracklayer I/O, with a full suite
of unit tests. Looks like it was an improvement.


>
>
>
>> Also, I wrote a function to directly import MACS output, does anyone want
>>> it in rtracklayer?
>>>
>>>
>> How widely used is MACS? I am not sure that I can commit to maintain
>> parsers for every tool's custom format. If it is becoming a standard for
>> representing ChIP-seq peak calls, then I'll consider it.
>>
>
> Pretty widely used.  The Farnham lab (whom we work with) prefers
> SoleSearch, and Brad Bernstein's lab usually seems to like their own (i.e.
> Kellis')  methods, but a lot of others (e.g. Wysocka, Liu, Rao, sometimes
> Zhao, etc.) start out with, or just use, MACS output and put it up on GEO.
>
> Anyways, here's the code.  Needless to say it isn't quite as optimized as
> rtracklayer I/O, but so it goes.
>
> importMACS <- function(filename, genome='hg18') {
>   macs = read.table(filename, sep="\t", header=TRUE,
> stringsAsFactors=FALSE)
>   names(macs)[ ncol(macs) ] = 'FDR'
>   names(macs)[ ncol(macs)-3 ] = 'score'
>   GR = df2GR(macs[, c('chr','start','end')])
>   elementMetadata(GR)$score = macs$score
>   if(!is.null(genome)) genome(GR) = genome
>   return(GR)
> }
>
>
So looking at this page:

http://liulab.dfci.harvard.edu/MACS/00README.html

There are a lot of different outputs. It sounds like you are dealing with
#1, which at least originally an XLS (maybe you are converting this to a
tab separated file?). Or is it something else? It sounds like #1 might be a
BED3 + N format file.


> This is one of a number of odds and ends in the 'cRank' package that I've
> been working on (since someone else used 'methLab' for their crappy GUI).
>
>
>
>>
>> Thanks,
>> Michael
>>
>
>  Thank you,
>
> --t
>
>
>
> --
> *A model is a lie that helps you see the truth.*
> *
> *
> Howard Skipper<http://cancerres.aacrjournals.org/content/31/9/1173.full.pdf>
>
>

	[[alternative HTML version deleted]]

