Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Noise Plot data #108

Open
hannesbecher opened this issue Apr 7, 2022 · 0 comments
Open

Export Noise Plot data #108

hannesbecher opened this issue Apr 7, 2022 · 0 comments

Comments

@hannesbecher
Copy link

Is there a way to export the noise plot data as CSV or similar? This would be most useful if one wanted to plot together and compare multiple datasets (like in the 2014 paper) without having to read in all BAM files again.

I tried to create a noise plot by hand starting with the filtered and corrected read counts readCountsCor:

avgReads <- apply(readCountsCor@assayData$counts, 2, mean)
vars <- apply(readCountsCor@assayData$counts, 2, function(x) matrixStats::varDiff(x/mean(x), trim=0.01))
snams <- unname(sapply(colnames(readCountsCor@assayData$counts), function(x) strsplit(x, "_")[[1]][[1]])) # specific to my file names
myNoiseData <- data.frame(snams, avgReads, vars)
write.table(myNoiseData, "myNoiseDataDown1Read.tsv", sep="\t", col.names=T, row.names=F, quote=F)

But the dot positions are not quite the same as in the actual plot. I presume the difference is that my code does not exclude blacklisted bins etc.

Is there a way to output the coordinates underlying the Noise Plot?

Many thanks,
Hannes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant