From 1794b68d34625b39404d5aba9e72646805b710ce Mon Sep 17 00:00:00 2001 From: Bo Li Date: Thu, 10 Feb 2011 23:39:07 -0600 Subject: [PATCH] Bugs in SingleModel.h are fixed. --- PairedEndModel.h | 2 +- PairedEndQModel.h | 2 +- SingleModel.h | 4 +--- SingleQModel.h | 2 +- rsem-calculate-expression | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/PairedEndModel.h b/PairedEndModel.h index acd9f30..e73c03d 100644 --- a/PairedEndModel.h +++ b/PairedEndModel.h @@ -321,7 +321,7 @@ void PairedEndModel::write(const char* outF) { npro->write(fo); if (mw != NULL) { - fprintf(fo, "%d\n", M); + fprintf(fo, "\n%d\n", M); for (int i = 0; i < M; i++) { fprintf(fo, "%.15g ", mw[i]); } diff --git a/PairedEndQModel.h b/PairedEndQModel.h index e328779..bac7135 100644 --- a/PairedEndQModel.h +++ b/PairedEndQModel.h @@ -335,7 +335,7 @@ void PairedEndQModel::write(const char* outF) { nqpro->write(fo); if (mw != NULL) { - fprintf(fo, "%d\n", M); + fprintf(fo, "\n%d\n", M); for (int i = 0; i < M; i++) { fprintf(fo, "%.15g ", mw[i]); } diff --git a/SingleModel.h b/SingleModel.h index 76c54f1..532f79c 100644 --- a/SingleModel.h +++ b/SingleModel.h @@ -334,8 +334,6 @@ void SingleModel::read(const char* inpF) { pro->read(fi); npro->read(fi); - fclose(fi); - if (fscanf(fi, "%d", &M) == 1) { mw = new double[M + 1]; for (int i = 0; i <= M; i++) fscanf(fi, "%lf", &mw[i]); @@ -363,7 +361,7 @@ void SingleModel::write(const char* outF) { npro->write(fo); if (mw != NULL) { - fprintf(fo, "%d\n", M); + fprintf(fo, "\n%d\n", M); for (int i = 0; i < M; i++) { fprintf(fo, "%.15g ", mw[i]); } diff --git a/SingleQModel.h b/SingleQModel.h index 92d8890..0c2ba34 100644 --- a/SingleQModel.h +++ b/SingleQModel.h @@ -377,7 +377,7 @@ void SingleQModel::write(const char* outF) { nqpro->write(fo); if (mw != NULL) { - fprintf(fo, "%d\n", M); + fprintf(fo, "\n%d\n", M); for (int i = 0; i < M; i++) { fprintf(fo, "%.15g ", mw[i]); } diff --git a/rsem-calculate-expression b/rsem-calculate-expression index dfb5052..ddeb8dd 100755 --- a/rsem-calculate-expression +++ b/rsem-calculate-expression @@ -93,7 +93,7 @@ pod2usage(-verbose => 2) if ($help == 1); if ($is_sam || $is_bam) { pod2usage(-msg => "Invalid number of arguments!", -exitval => 2, -verbose => 2) if (scalar(@ARGV) != 3); pod2usage(-msg => "--sam and --bam cannot be active at the same time!", -exitval => 2, -verbose => 2) if ($is_sam == 1&& $is_bam == 1); - pod2usage(-msg => "--bowtie-path, --bowtie-n, --bowtie-e, --bowtie-m, --phred33-quals, --phred64-quals or --solexa-quals cannot be set if input is SAM/BAM format!", -exitval => 2, -verbose => 2) if ($bowtie_path ne "" || $C != 2 || $E != 999999 || $maxHits != 200 || $phred33 || $phred64 || $solexa); + pod2usage(-msg => "--bowtie-path, --bowtie-n, --bowtie-e, --bowtie-m, --phred33-quals, --phred64-quals or --solexa-quals cannot be set if input is SAM/BAM format!", -exitval => 2, -verbose => 2) if ($bowtie_path ne "" || $C != 2 || $E != 99999999 || $maxHits != 200 || $phred33 || $phred64 || $solexa); } else { pod2usage(-msg => "Invalid number of arguments!", -exitval => 2, -verbose => 2) if (!$paired_end && scalar(@ARGV) != 3 || $paired_end && scalar(@ARGV) != 4); -- 2.39.2