No, that's not the output from bowtie2 (if someone told you that, they were wrong), it's the output from bsmooth's methylation extractor (or at least it looks like it). The aligner that you tell bsmooth to use has no effect on the formatting of the methylation file.
Unconfigured Ad
Collapse
X
-
I'll also add that after a bit of checking/memory refreshing, the format you posted isn't from bsmooth but is similar to bedGraph format, just with the strand column removed. Adding a strand (e.g., awk 'BEGIN{OFS="\t"}{print $1,$2,$3,".",$4,$5}' somefile > somefile.bedGraph) should allow you to use bedGraph2BSseq.py from bison. The instructions for loading the resulting files into R are in the README.md file.
Comment
-
-
Well, you end up just reading the file into a dataframe, adding a column of "." and writing to a new file in a different order:
Or something like that. Having said that, perhaps you're lucky and the positions covered in each of the three files are the same. Then you just skip all of that with something like:Code:d <- read.table("somefile", header=F) d$strand = "." write.table(d[,c(1,2,5,3,4)], file="somefile.new", row.names=F, colnames=F)
or something like that. I've not tested any of that, but it should give you the idea.Code:library(bsseq) files<- c("sample1.file", "sample2.file", "sample3.file") fl <- lapply(files, function(x) read.delim(x, header=F)) gr <- GRanges(seqnames=Rle(fl[[1]][,1]), ranges=IRanges(start=fl[[1]][,2], end=fl[[1]][,3]), strand=Rle("*", nrow(fl[[1]]))) M <- sapply(fl, function(x) x$[,3]) Cov <- sapply(fl, function(x) x$[,4]) groups = data.frame(row.names=files, condition=c("WT","Mut","Mut")) BS <- BSseq(M=M, Cov=Cov, gr=gr, pData=groups, samplesNames=samples)
Given your apparent newness to R, you might want to take a local course before continuing.
Comment
-
-
thank you very much for your help, I´m just starting with R but right now I´m not able to take any course, I will do it during Christmas vacation when I have more time... but I´m pushed to finish this before...
thank you very much again for stealing your time
Comment
-
-
I run without errors the code that you wrote me for inserting the column but the output is this:
chr1 564495 1 564496 1
chr1 564501 1 564502 1
chr1 565013 1 565014 1
chr1 565040 1 565041 1
chr1 565262 8 565263 0
chr1 565397 5 565398 1
chr1 565469 2 565470 2
the columns are not tabulated (all the data in the same column), the "." column is not there and the others are not sorted
Comment
-
Latest Articles
Collapse
-
by SEQadmin2
I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.
Here are nine questions we think about, in roughly the order they matter, before...-
Channel: Articles
06-18-2026, 07:11 AM -
-
by SEQadmin2
Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.
The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
...-
Channel: Articles
06-02-2026, 10:05 AM -
ad_right_rmr
Collapse
News
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Whole-Genome Sequencing Traces Faroe Islands Ancestry to a North Atlantic Founder Population
by SEQadmin2
Started by SEQadmin2, 06-17-2026, 06:09 AM
|
0 responses
24 views
0 reactions
|
Last Post
by SEQadmin2
06-17-2026, 06:09 AM
|
||
|
Sequencing the Two-Toed Sloth Genome Reveals Jumping Genes Tied to Its Extreme Metabolism
by SEQadmin2
Started by SEQadmin2, 06-09-2026, 11:58 AM
|
0 responses
42 views
0 reactions
|
Last Post
by SEQadmin2
06-09-2026, 11:58 AM
|
||
|
Started by SEQadmin2, 06-05-2026, 10:09 AM
|
0 responses
48 views
0 reactions
|
Last Post
by SEQadmin2
06-05-2026, 10:09 AM
|
||
|
Started by SEQadmin2, 06-04-2026, 08:59 AM
|
0 responses
49 views
0 reactions
|
Last Post
by SEQadmin2
06-04-2026, 08:59 AM
|
Comment