Entering edit mode
8.5 years ago
kapil.joshi036
▴
80
This is a bed file which is generated from a bam file
ChrM 3259 3900 +
and i have analysis bed file where i want to change the start and end column values acoording to the bed file co-ordinates so that i can do the furthere analysis
#chr start end diseases
chrM 1 1 xyz
chrM 2 2 xyz
chrM 3 3 xyz
chrM 4 4 xyz
chrM 5 5 xyz
Here I want to replace the start and end column values which are like 1 to 641 so here i want to make 1 is replaced by 3259 and onwards
Expected output should look like this
#chr start end diseases
chrM 3259 3259 xyz
chrM 3260 3260 xyz
chrM 3261 3261 xyz
chrM 3262 3262 xyz
.
.
chrM 3900 3900 xyz
help me thank you in advance
Please rephrase your question so it is clearer what you want. And avoid SMS jargon in online forums - avoiding SMS jargon is an indicator that you take what you do seriously.
Some information you may want to add:
Honestly though, this is pure text processing and is not strictly bioinformatics.
ok ram sir , where i can find the answer
Your question is still unclear. If you don't know the answer to the questions I've asked and I'm asking now, you should take a good look at your scientific problem again, consult with your colleagues and ensure you are on the right track.
@kapil, Instead of using 'analysis bed file' or 'non-analysis bed file' etc, explain in easy terms. For instance,
A.bed
contains this..,B.bed
contains this..and theexpected output
would be this..and I have tried this..It would be easy to understand the problem you are facing.
I still can't understand what it is that you are asking (if the version above is one after clarification).
@kapil's ISP probably charges him by the character so the SMS jargon :-)
can u please check now sir
I think I have understood what @kapil wants.
If your columns are space separated then the following should work
otherwise adjust the input/output separator as needed.