Question: RTrackLayer import bed without name and strand orientation
0
gravatar for Seigfried
2.0 years ago by
Seigfried70
Seigfried70 wrote:

I have a bed file like this

ChrIII_A_nidulans_FGSC_A4   0   10  0.83700
ChrIII_A_nidulans_FGSC_A4   10  43  1.11600
ChrIII_A_nidulans_FGSC_A4   43  59  1.39500
ChrIII_A_nidulans_FGSC_A4   59  65  1.67400
ChrIII_A_nidulans_FGSC_A4   65  74  1.95300

As you can see there are no Strand name columns or Strand orientation column. If I try to import this file into R, it calls the score column as the name column

library(GenomicRanges)
library(rtracklayer)
library(IRanges)
file <- import.bed(file.path('C:/Users/ami/Downloads', file.bdg'))

The output for this is below

GRanges object with 4233716 ranges and 1 metadata column:
                         seqnames         ranges strand |        name
                            <Rle>      <IRanges>  <Rle> | <character>
    [1] ChrIII_A_nidulans_FGSC_A4       [ 1, 10]      * |     0.83700
    [2] ChrIII_A_nidulans_FGSC_A4       [11, 43]      * |     1.11600
    [3] ChrIII_A_nidulans_FGSC_A4       [44, 59]      * |     1.39500
    [4] ChrIII_A_nidulans_FGSC_A4       [60, 65]      * |     1.67400
    [5] ChrIII_A_nidulans_FGSC_A4       [66, 74]      * |     1.95300
    ...                       ...            ...    ... .         ...
    [4233712]   mito_A_nidulans_FGSC_A4 [33211, 33214]      * |     8.37000
    [4233713]   mito_A_nidulans_FGSC_A4 [33215, 33216]      * |     8.09100
    [4233714]   mito_A_nidulans_FGSC_A4 [33217, 33218]      * |     7.81200
    [4233715]   mito_A_nidulans_FGSC_A4 [33219, 33220]      * |     7.53300
    [4233716]   mito_A_nidulans_FGSC_A4 [33221, 33227]      * |     7.25400
    -------
    seqinfo: 9 sequences from an unspecified genome; no seqlengths

My overall objective is to create a TSS line plot using this bed file. How can I load a bed file properly in rtracklayer and ignore these columns?

R bed rtracklayer • 774 views
ADD COMMENTlink modified 23 months ago by Biostar ♦♦ 20 • written 2.0 years ago by Seigfried70
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: 1973 users visited in the last hour