There are 14 columns in cuffdiff output
awk -F"\t" '{print $1"\t"$8"\t"$9"\t"$10}' gene_exp.diff | head test_id value_1 value_2 log2(fold_change) A2M-AS1|144571|locus1of1|1 0.0190991 0.0447137 1.22722 A2MP1|3|locus1of1|1 0 0 0 A2M|2|locus1of1|1 0.0261932 0.0171011 -0.615099 A3GALT2|127550|locus1of1|1 0.0287783 0 -1.79769e+308 A4GNT|51146|locus1of1|1 0 0 0 AA06|100506677|locus1of1|1 0 0 0 AACSP1|729522|locus1of1|1 0 0.00822783 1.79769e+308 AADACL2-AS1|101928142|locus1of1|2 0 0 0 AADACL2|344752|locus1of1|1 0 0 0 ...
the log2(fold_change) was computed by log2(value_2/value_1)
where “value_1” comes from the first “bam file” and “value_2” comes from the second “bam file” as the following command
cuffdiff -o /somePath/ /somePath/transcripts.gtf value_1_firstBam.bam value_2_secondBam.bam