Unable to perform analysis on all the chromosomes with the latest version of ChIPQC 1.12
1
0
Entering edit mode
@tutejareetu-13280
Last seen 4.7 years ago

Dear All,

I have some problems running my script with the latest version of ChIPQC1.12. The script was working well on the older version of the package. I was wondering if someone else is also facing the same problem and could give me a solution. Below is my code and output:

samples = read.csv("metadata.csv")

mydata= ChIPQC(samples, annotation=NULL, chromosomes=NULL)

Output:

sample_0   sample_0  1 bed
sample_5   sample_5  1 bed
sample_10   sample_10  1 bed
sample_15   sample_15  1 bed
sample_20   sample_20  1 bed
Computing metrics for 5 samples...
list
Bam file has 5 contigs

Now it calculates histogram, SSD, unique positions, shift etc only for Chr1, Chr2 and Chr3.

I also tried giving all five chr as vectors: chromosomes= c("Chr1","Chr2","Chr3","Chr4","Chr5") but results are same.

Next I tried constructing annotation using genomic features. As follows:

axx_txdb= makeTxDbFromGFF(file="mygff_GFF3_genes_transposons.201606.gff", 
                                dataSource=my gff file", 
                                format="gff3", organism="unknown organism")

but including the annotation lead to another problem. I am very new to genomicfeatures package. Not sure if I am doing anything wrong here.

mychip= ChIPQC(samples, annotation=axx_txdb,chromosomes=NULL)

Error:

Compiling annotation...

Error in GeneAnnotation == "hg19" : 

  comparison (1) is possible only for atomic and list types

Why it is considering "hg19" for annotation??

To add information re my metadata file. I have the following columns:

SampleID Condition Replicate bamReads Peaks PeakCaller
sample_0 sample_0 1 chip_0_outsample.bam sample_0_outsample.macs2_peaks.narrowPeak bed
sample_5 sample_5 1 chip_5_outsample.bam sample_5_outsample.macs2_peaks.narrowPeak bed
sample_10 sample_10 1 chip_10_outsample.bam sample_10_outsample.macs2_peaks.narrowPeak bed
sample_15 sample_15 1 chip_15_outsample.bam sample_15_outsample.macs2_peaks.narrowPeak bed
sample_20 sample_20 1 chip_20_outsample.bam sample_20_outsample.macs2_peaks.narrowPeak bed
chipqc R • 2.8k views
ADD COMMENT
0
Entering edit mode
@thomas-carroll-7019
Last seen 2.1 years ago
United States/New York/The Rockefeller …

hi,

When running ChIPQC on multiple samples by default ChIPQC function sets the annotation to hg19. In the future we should look to take advantage of the some of the Bioconductor packages which can predict the genome from the BAM headers.

At the moment ChIPQC does not accept txdb objects although perhaps it should alongside accepting valid GFF or GTF files.

For information on constructing custom annotation for current and previous ChIPQC versions, this post maybe quite helpful.

creating custom genome annotation for the ChIPQC package

Annotation provided to ChIPQC must be in a list format where the first element of the list must contain a character string representing the version of annotation (e.g CustomV1.0 or Custom etc) and all remaining list elements contain GRanges objects to be used in annotation enrichment calculation.

To work from a txdb made from a GTF as in your example you could try something like this.

library(GenomicRanges)
library(ChIPQC)
library(GenomicFeatures)
txdb= makeTxDbFromGFF(file="mygff_GFF3_genes_transposons.201606.gff",
customAnnotation <- list(
  version="GTFCustom",
    All5utrs = reduce(unique(unlist(fiveUTRsByTranscript(txdb))))
    All3utrs = reduce(unique(unlist(threeUTRsByTranscript(txdb))))
    Allcds = reduce(unique(unlist(cdsBy(txdb,"tx"))))
    Allintrons = reduce(unique(unlist(intronsByTranscript(txdb))))
    Alltranscripts = reduce(unique(unlist(transcripts(txdb))))
  )

 

mychip= ChIPQC(samples, annotation=customAnnotation, chromosomes=NULL)

For the question about Chromosomes, I am not sure without seeing your BAM file. It looks like they only contain 5 chromosomes and then only 3 are used to calculate QC. This may be because of a low number of reads or no peaks found on two of the chromosomes. Could you share a BAM with me (chip_0_outsample.bam) and the associated peak file privately (tc.infomatics@gmail.com) so I can look? 

best,

tom

ADD COMMENT

Login before adding your answer.

Traffic: 838 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6