SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
bedtools intersect -f -F -r behavior pepeluisrr Bioinformatics 0 08-15-2017 08:07 AM
bedtools intersect - problem with chromosomes with number >=10? Phlya Bioinformatics 2 06-02-2014 01:15 AM
Counting read depth using bedtools Kaas Bioinformatics 4 02-21-2014 08:12 PM
counting reads per user-defined region. Bedtools intersect? mcnach Bioinformatics 6 02-18-2014 01:41 AM
BEDtools intersect output is BED instead of BAM syfo Bioinformatics 1 12-18-2012 05:26 AM

Reply
 
Thread Tools
Old 09-01-2017, 06:37 AM   #1
foolishbrat
Member
 
Location: South East Asia

Join Date: Nov 2008
Posts: 44
Default Can or should we perform feature counting with `bedtools intersect -c`?

I have the following BAM file and a annotation file.
What I want to do is to calculate reads count in
I can do it with the following three methods.

Below is the code

Code:
    #!/bin/bash
    INPUT_BAM=my_paired_end_alignment.bam
    ANNNOT_BED=peak_annot.bed
    ANNNOT_GTF=peak_annot.gtf
    
    # Temporary file
    ALIGNMENT_BED=my_paired_end_alignment.bed
    
    #-----------
    # Method 1
    #-----------
    FINAL_COUNT_METHOD1=output_method1.txt
    bedtools bamtobed -bedpe -i $INPUT_BAM > $ALIGNMENT_BED
    bedtools intersect -a $ANNOT_BED -b $ALIGNMENT_BED -c > $FINAL_COUNT_METHOD1
    
    #-----------
    # Method 2
    #-----------
    FINAL_COUNT_METHOD2=output_method2.txt
    bedtools multicov -bams $INPUT_BAM -bed $ANNOT_BED > $FINAL_COUNT_METHOD2
    
    #-----------
    # Method 3
    #-----------
    featureCounts  -a $ANNOT_GTF -o counts.txt $INPUT_BAM
The result given by Method1 is so different from Method2 (totally uncorrelated),
whereas Method2 is highly correlated with Method3.

My question is Method1 the right way to count feature? If not why?
Should we use Method2 or Method3 instead?
foolishbrat is offline   Reply With Quote
Old 09-01-2017, 08:11 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,550
Default

For reference cross-posted: https://www.biostars.org/p/270366/
GenoMax is offline   Reply With Quote
Reply

Tags
bedtools, featurecounts, peak calling, rna-seq

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 05:34 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO