BED file : error in naming chromosome's column
1
0
Entering edit mode
6.5 years ago
anais1396 ▴ 30

Hello everyone !!

I have a problem with the chromosome's column in my BED files and I'll try to explain that. I have bed files from a peak calling (in format narrowPeak) and in the column chr, we have just the number of the chr that is writting and we need 'chr+the number of the chr' writting.

Let's take an example of my file to be more clear:

File 1: wrong writting in the column chr

chr-number   start-position   end-position   
    1            10003           10454

File 2: good writting in the column chr

chr-number   start-position    end-position
  chr1            10003           10454

I need the first column of my file is writting with 'chr+number of the chr' and not just with the number because I'm doing intersectBed (bedtools) with an other file after the peak caling and this other file is writting with 'chr+the number of the chr' in the chr's column so I have an error message :

ERROR: File some.bed has inconsistent naming convention for record:

1 10003 10454 [...]

Please help me to solve this !! How can I add 'chr' before the number in the fist column of my bed file ?? And I need to add this for each line of my bed file because I've just the number of the chr writting

Thank you in advance !!

Anaïs

NGS bed • 5.3k views
ADD COMMENT
1
Entering edit mode
ADD REPLY
0
Entering edit mode

Sorry, I forgot !! It's now done

ADD REPLY
1
Entering edit mode
ADD REPLY
1
Entering edit mode

search for awk prepend first column. The answer here will take you to a hairs width from the solution.

ADD REPLY
6
0
Entering edit mode

Thank you very much !! It solves my problem !! ;-)

ADD REPLY
0
Entering edit mode

If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted. Upvote|Bookmark|Accept

ADD REPLY

Login before adding your answer.

Traffic: 1673 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6