1
$\begingroup$

I have this peak file I retrieved from an ENCODE chip-seq matrix. Its .broadpeak file looks like this:

chr22   16096195    16096367    .   517 .   8.245591    1.4 -1
chr22   16191942    16192481    .   374 .   4.452878    1.7 -1
chr22   16192350    16192560    .   480 .   7.273034    1.3 -1
chr22   16848326    16848437    .   687 .   12.776952   3.4 -1
chr22   16849900    16851299    .   374 .   4.444921    12.8    -1
chr22   16851301    16851828    .   394 .   4.968297    3.2 -1
chr22   16852259    16852459    .   514 .   8.182164    2.4 -1
chr22   16853163    16855156    .   328 .   3.229621    7.6 -1
chr22   16856415    16857273    .   374 .   4.450283    5.9 -1
chr22   16857361    16857946    .   375 .   4.475713    2.4 -1
chr22   16857760    16857903    .   637 .   11.443585   4.2 -1
chr22   16858449    16858683    .   645 .   11.655504   11.1    -1
chr22   16860284    16860823    .   382 .   4.655282    2.4 -1
chr22   16861104    16862410    .   370 .   4.343772    10.8    -1
chr22   16928019    16928525    .   385 .   4.743283    2.2 -1
chr22   16928388    16928554    .   602 .   10.515230   4.4 -1
chr22   17066663    17067190    .   487 .   7.452445    12.6    -1
chr22   17076317    17076417    .   699 .   13.091462   2.8 -1
chr22   17079512    17087549    .   1000    .   29.157293   13.6    -1
chr22   17105156    17105287    .   582 .   9.993482    1.6 -1
chr22   17162805    17163461    .   763 .   14.801068   100.0   -1
chr22   17198501    17199415    .   615 .   10.861807   15.1    -1
chr22   17228872    17229131    .   713 .   13.478983   15.7    -1
chr22   17229147    17229434    .   621 .   11.023589   13.2    -1

I want to make the annotation and have the entrez ids for the nearest genes. I'm new to this I keep trying some tools but nothing seems to work. I used peakanalyzer a lot but it keeps saying that this file is missing columns it needs to be 12 column file but I don't know how to do it. If I add more columns would that change the annotation.

$\endgroup$
2
  • 1
    $\begingroup$ Have a look at the GTF/GFF3 format which are standard formats for genome annotation. You can find proximal genes by mapping these peak locations to the genome GTF file. If you are specifically interested in using peakfinder then I would suggest that you read the manual carefully for what the input format is supposed to be like. $\endgroup$ – WYSIWYG Nov 19 '15 at 8:43
  • $\begingroup$ i have read the manual of peakanalyzer i need a bed file with 12 columns although thw first 3 are needed for the annotation. I cant find a way to convert the file i have in another format so i can use it . $\endgroup$ – Xanthoula Atsalaki Nov 20 '15 at 15:03
0
$\begingroup$

This is what the columns of broadPeak format mean (from UCSC):

  1. chrom - Name of the chromosome (or contig, scaffold, etc.).
  2. chromStart - The starting position of the feature in the chromosome or scaffold. The first base in a chromosome is numbered 0.
  3. chromEnd - The ending position of the feature in the chromosome or scaffold. The chromEnd base is not included in the display of the feature. For example, the first 100 bases of a chromosome are defined as chromStart=0, chromEnd=100, and span the bases numbered 0-99. If all scores were '0' when the data were submitted to the DCC, the DCC
    assigned scores 1-1000 based on signal value. Ideally the average signalValue per base spread is between 100-1000.
  4. name - Name given to a region (preferably unique). Use '.' if no name is assigned.
  5. score - Indicates how dark the peak will be displayed in the browser (0-1000).
  6. strand - +/- to denote strand or orientation (whenever applicable). Use '.' if no orientation is assigned.
  7. signalValue - Measurement of overall (usually, average) enrichment for the region.
  8. pValue - Measurement of statistical significance (-log10). Use -1 if no pValue is assigned.
  9. qValue - Measurement of statistical significance using false discovery rate (-log10). Use -1 if no qValue is assigned.

And this is how the BED format looks like (from UCSC):

  1. chrom - The name of the chromosome (e.g. chr3, chrY, chr2_random) or scaffold (e.g. scaffold10671)
  2. chromStart - The starting position of the feature in the chromosome or scaffold. The first base in a chromosome is numbered 0.
  3. chromEnd - The ending position of the feature in the chromosome or scaffold. The chromEnd base is not included in the display of the feature. For example, the first 100 bases of a chromosome are defined as chromStart=0, chromEnd=100, and span the bases numbered 0-99.
  4. name - Defines the name of the BED line. This label is displayed to the left of the BED line in the Genome Browser window when the track is open to full display mode or directly to the left of the item in pack mode.
  5. score - A score between 0 and 1000. If the track line useScore attribute is set to 1 for this annotation data set, the score value will determine the level of gray in which this feature is displayed (higher numbers = darker gray).
  6. strand - Defines the strand - either '+' or '-'.
  7. thickStart - The starting position at which the feature is drawn thickly (for example, the start codon in gene displays). When there is no thick part, thickStart and thickEnd are usually set to the chromStart position.
  8. thickEnd - The ending position at which the feature is drawn thickly (for example, the stop codon in gene displays).
  9. itemRgb - An RGB value of the form R,G,B (e.g. 255,0,0). If the track line itemRgb attribute is set to "On", this RBG value will determine the display color of the data contained in this BED line. NOTE: It is recommended that a simple color scheme (eight colors or less) be used with this attribute to avoid overwhelming the color resources of the Genome Browser and your Internet browser.
  10. blockCount - The number of blocks (exons) in the BED line.
  11. blockSizes - A comma-separated list of the block sizes. The number of items in this list should correspond to blockCount.
  12. blockStarts - A comma-separated list of block starts. All of the blockStart positions should be calculated relative to chromStart. The number of items in this list should correspond to blockCount.

So, first six columns are basically the same. The 7th and 8th column of your new BED file should be same as 3rd and 4th columns respectively. Since columns 4-12 are actually optional for a BED file you need not actually fill the rest of the columns. In any case blockCount would be zero for your case. RGB value is also not necessary. However, if whatever software you are using is asking for a 12 column file then set these:

  • itemRGB (column 9) = 0,0,0 (black)
  • blockCount (column 10) = 0

You can use whitespace in rest of the two columns.

You can easily use any scripting language to do this. I am not going to explain how to do that because that is off-topic here.


How to find nearest genes without using Peakanalyzer?

  • Download the GENCODE annotation GTF file and decompress it.
  • Read the broadPeak file and store the locations of the peaks.
  • Define what the minimum level of proximity is (for e.g. 2kbp up/downstream)
  • Parse only those lines of the GTF where the third column="gene"
  • Subtract the downstream window to start and add the upstream window to stop position of the gene. Columns 4 and 5 respectively.
  • Gene information is stored in 9th column.
  • If the stored peak position falls within the modified start/stop positions then print the 9th column.

Again, this is has to be done programmatically. It is not very difficult. To explain how to do that is off-topic in this forum. I explained the algorithm which you can implement in your favourite scripting language.

$\endgroup$
3
  • $\begingroup$ Thanks a lot for your answer i have found a way to make the .broadPeak file(6+3 bed file) to a 6 bed file that was accepted by the peak analyzer with this command in cmd cut –f-6 total_pooled.broadPeak > final.bed i dont know if the genes are correct i assumed that they are because i read somewhere that to annotate and find the nearest genes you need only the first three columns of my .broadpeak file? The second solution seems interesting i will look it and try to implement it in R after i solve some other more important issues with the ENCODE API. $\endgroup$ – Xanthoula Atsalaki Nov 23 '15 at 9:08
  • $\begingroup$ @XanthoulaAtsalaki awk is a very nice scripting language for these kind of jobs. For something like printing selected columns it is as easy as awk -F "<column separator>" '{print $i, $j, $k}' inputfile > outputfile (where i, j & k are column numbers). $\endgroup$ – WYSIWYG Nov 23 '15 at 12:35
  • $\begingroup$ thanksss a lot for the precious informations you are giving me really you are so helpful , i just started to study bioinformatics and R for a master. i want to find a subject for a doctoral i want to try in this field, im so confused i keep reading and reading and there are so many tools and software and papers in this field i feel constanlty like a first grade student . I will look into this scripting language definitely. Thanks from my heart for your time and the information. $\endgroup$ – Xanthoula Atsalaki Nov 25 '15 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.