Question: BED file : error in naming chromosome's column
0
gravatar for anais1396
13 months ago by
anais139620
Brussels
anais139620 wrote:

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 • 770 views
ADD COMMENTlink written 13 months ago by anais139620
1

please validate: C: Problem with the installation of Zinba(peak caller) on R

ADD REPLYlink written 13 months ago by Pierre Lindenbaum121k

Sorry, I forgot !! It's now done

ADD REPLYlink written 13 months ago by anais139620
1

please, comment or validate: C: ATAC-seq : strategies to have the list of the expressed genes

ADD REPLYlink written 13 months ago by Pierre Lindenbaum121k
1

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

ADD REPLYlink written 13 months ago by h.mon26k
5
gravatar for Pierre Lindenbaum
13 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum121k wrote:
sed 's/^/chr/'
ADD COMMENTlink written 13 months ago by Pierre Lindenbaum121k

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

ADD REPLYlink written 13 months ago by anais139620

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 REPLYlink written 13 months ago by Pierre Lindenbaum121k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 932 users visited in the last hour