Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • bedToBam gives empty output

    Hi all,

    I am trying to convert a .bed file which I made from data from an ancient genome tiling microarray into a .bam file. I am running into this annoying error which I do not seem able to resolve.

    Running the following command:

    bedtools bedtobam -i ~$/etc/file.bed -g ~$/etc/arabidopsis.txt > file.bam

    I get a bam output file which is only 1 Kb. (For a point of reference my bed file is 108mb). The .bed file is a self-made BED5 format which looks like this:

    Chr1 25 50 id-1 0.005
    Chr1 60 85 id-2 0.001
    Chr1 113 138 id-3 0.001
    Chr1 154 179 id-4 0.359
    Chr1 185 210 id-5 0.001
    etc, etc etc


    The genome file looks like this
    Chr1 30427671
    Chr2 19698289
    Chr3 23459830
    Chr4 18585056
    Chr5 26975502
    (Chrmt and chrCl are not necessary since these are not in the bed either)

    When I head the 1kb file from the output this follows:
    ~/some_directory$ samtools view -H file.bam
    @HD VN:1.0 SO:unsorted
    @PG ID:BEDTools_bedToBam VN:Vv2.16.2
    @SQ SN:Chr1 AS:/directories/arabidopsis.txt LN:30427671
    @SQ SN:Chr2 AS:/directories/arabidopsis.txt LN:19698289
    @SQ SN:Chr3 AS:/directories/arabidopsis.txt LN:23459830
    @SQ SN:Chr4 AS:/directories/arabidopsis.txt LN:18585056
    @SQ SN:Chr5 AS:/directories/arabidopsis.txt LN:26975502

    It seems like the SQ and SN lines are generated and then it stops. Any ideas? All help will be greatly appreciated!

    -R
    Last edited by rivered; 03-25-2018, 12:28 PM. Reason: adjustments

  • #2
    Solved the problem!

    Somehow R converted the generated .BED files into Macintosh(CR) dataformat. Checked eol conversion in notepad ++ and saw it was not UNIX format.

    Then converted the files with the following command:
    perl -p -e 's/\r/\n/g' < macfile.txt > unixfile.txt

    Hope it helps someone,
    R

    Comment

    Latest Articles

    Collapse

    • seqadmin
      Advanced Tools Transforming the Field of Cytogenomics
      by seqadmin


      At the intersection of cytogenetics and genomics lies the exciting field of cytogenomics. It focuses on studying chromosomes at a molecular scale, involving techniques that analyze either the whole genome or particular DNA sequences to examine variations in structure and behavior at the chromosomal or subchromosomal level. By integrating cytogenetic techniques with genomic analysis, researchers can effectively investigate chromosomal abnormalities related to diseases, particularly...
      09-26-2023, 06:26 AM
    • seqadmin
      How RNA-Seq is Transforming Cancer Studies
      by seqadmin



      Cancer research has been transformed through numerous molecular techniques, with RNA sequencing (RNA-seq) playing a crucial role in understanding the complexity of the disease. Maša Ivin, Ph.D., Scientific Writer at Lexogen, and Yvonne Goepel Ph.D., Product Manager at Lexogen, remarked that “The high-throughput nature of RNA-seq allows for rapid profiling and deep exploration of the transcriptome.” They emphasized its indispensable role in cancer research, aiding in biomarker...
      09-07-2023, 11:15 PM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, 09-29-2023, 09:38 AM
    0 responses
    10 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 09-27-2023, 06:57 AM
    0 responses
    12 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 09-26-2023, 07:53 AM
    1 response
    25 views
    0 likes
    Last Post seed_phrase_metal_storage  
    Started by seqadmin, 09-25-2023, 07:42 AM
    0 responses
    17 views
    0 likes
    Last Post seqadmin  
    Working...
    X