Skip to content

Commit

Permalink
Extract: make the program robust to absent columns
Browse files Browse the repository at this point in the history
  • Loading branch information
biochem-fan committed May 27, 2020
1 parent 4268a18 commit e176a91
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/preprocessing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,13 @@ void Preprocessing::joinAllStarFiles()
{
MetaDataTable MDonestack;
MDonestack.read(fn_star);

if (!compareLabels(MDout, MDonestack))
{
std::cout << "The STAR file " << fn_star << " contains a column not present in others. Missing values will be filled by default values (0 or empty string)" << std::endl;
MDout.addMissingLabels(&MDonestack);
MDonestack.addMissingLabels(&MDout);
}
MDout.append(MDonestack);
}
}
Expand Down

0 comments on commit e176a91

Please sign in to comment.