This is in reference to cuffdiff v2.0.2 (3522)
Hi, I have been banging my head on why cuffdiff and cufflinks have different FPKM calculations. I finally stumbled upon the settings to make cufflinks match the FPKM values created with default settings of cuffdiff:
cuffdiff (defaults) mygenes.gtf mysample1.bam mysample1.bam
cufflinks --compatible-hits-norm --max-frag-multihits 1 -G mygenes.gtf mysample1.bam
I think there is a mistake in the cuffdiff options list, where --max-frag-multihits is listed as unlimited in the default state, but it is probably actually set to 1.
also, I add a pseudocount RPKM of 0.01 to both, otherwise cufflinks makes very small RPKMs, unlike cuffdiff, where it sets it to zero.
At least now it is possible for me to reproduce the FPKMs that cuffdiff makes on default settings. I hope the authors fix this.
Note the plot is on log2 scale for the RPKMs, but the match is exact when on the linear scale as well (with exception of a few - those genes with extremely small FPKMs ~ e-200 as calculated by cufflinks).
btw, I carefully compared all the options and saw that the options for --compatible-hits-norm and --total-hits-norm are flipped between the two programs:
CUFFLINKS: --compatible-hits-norm count hits compatible with reference RNAs only [ default: FALSE ]
CUFFDIFF: --compatible-hits-norm count hits compatible with reference RNAs only [ default: TRUE ]
CUFFLINKS: --total-hits-norm count all hits for normalization [ default: TRUE ]
CUFFDIFF: --total-hits-norm count all hits for normalization [ default: FALSE ]
Interestingly, there is another normalization only offered by Cuffdiff and set to true:
CUFFDIFF only: --geometric-norm use geometric mean normalization [ default: TRUE ]
Both Cufflinks and Cuffdiff say the default for max-frag-multihits is unlimited, but I have found setting it to 1 in Cufflinks brings the two into agreement:
CUFFLINKS --max-frag-multihits Maximum number of alignments allowed per fragment [ default: unlim ]
CUFFDIFF --max-frag-multihits Maximum number of alignments allowed per fragment [ default: unlim ]
Hi, I have been banging my head on why cuffdiff and cufflinks have different FPKM calculations. I finally stumbled upon the settings to make cufflinks match the FPKM values created with default settings of cuffdiff:
cuffdiff (defaults) mygenes.gtf mysample1.bam mysample1.bam
cufflinks --compatible-hits-norm --max-frag-multihits 1 -G mygenes.gtf mysample1.bam
I think there is a mistake in the cuffdiff options list, where --max-frag-multihits is listed as unlimited in the default state, but it is probably actually set to 1.
also, I add a pseudocount RPKM of 0.01 to both, otherwise cufflinks makes very small RPKMs, unlike cuffdiff, where it sets it to zero.
At least now it is possible for me to reproduce the FPKMs that cuffdiff makes on default settings. I hope the authors fix this.
Note the plot is on log2 scale for the RPKMs, but the match is exact when on the linear scale as well (with exception of a few - those genes with extremely small FPKMs ~ e-200 as calculated by cufflinks).
btw, I carefully compared all the options and saw that the options for --compatible-hits-norm and --total-hits-norm are flipped between the two programs:
CUFFLINKS: --compatible-hits-norm count hits compatible with reference RNAs only [ default: FALSE ]
CUFFDIFF: --compatible-hits-norm count hits compatible with reference RNAs only [ default: TRUE ]
CUFFLINKS: --total-hits-norm count all hits for normalization [ default: TRUE ]
CUFFDIFF: --total-hits-norm count all hits for normalization [ default: FALSE ]
Interestingly, there is another normalization only offered by Cuffdiff and set to true:
CUFFDIFF only: --geometric-norm use geometric mean normalization [ default: TRUE ]
Both Cufflinks and Cuffdiff say the default for max-frag-multihits is unlimited, but I have found setting it to 1 in Cufflinks brings the two into agreement:
CUFFLINKS --max-frag-multihits Maximum number of alignments allowed per fragment [ default: unlim ]
CUFFDIFF --max-frag-multihits Maximum number of alignments allowed per fragment [ default: unlim ]
Comment