Hi,

I have been using the ShortRead package with my sequencing data. It has been
making my life a lot easier.

One thing I noticed that the logic in the uniqueFilter function seems to be
problematic.

The original function is:
function (withSread = TRUE, .name = "UniqueFilter")
{
    .check_type_and_length(withSread, "logical", 1)
    srFilter(function(x) {
        if (withSread)
            !srduplicated(x)
        else {
            !(duplicated(position(x)) & duplicated(strand(x)) &
                duplicated(chromosome(x)))
        }
    }, name = .name)
}

If withSread = FALSE, the else part seems to filter out lots of reads I
would like to keep.

My dumb solution is to have this change:
!(duplicated(paste(position(x), strand(x), chromosome(x),sep=";")))

I may have misused the function though.
> sessionInfo()
R version 2.10.0 (2009-10-26)
x86_64-redhat-linux-gnu

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] ShortRead_1.4.0   lattice_0.17-26   BSgenome_1.14.2   Biostrings_2.14.8
[5] IRanges_1.4.9

loaded via a namespace (and not attached):
[1] Biobase_2.6.1 grid_2.10.0   hwriter_1.1   tools_2.10.0
>

Thanks,
Jason

        [[alternative HTML version deleted]]

_______________________________________________
Bioc-sig-sequencing mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing

Reply via email to