Skip to content

Commit

Permalink
added meta
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasrausch committed Jan 25, 2019
1 parent b80367c commit 74c6a31
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,29 @@ namespace bamstats
rfile.push(boost::iostreams::file_sink(c.jsonout.string().c_str(), std::ios_base::out | std::ios_base::binary));

// Sample information
rfile << "{\"samples\": [";
rfile << '{';
nlohmann::json meta;
meta["method"] = "alfred";
meta["version"] = alfredVersionNumber;
meta["subcommand"] = "qc";
meta["regionFile"] == c.regionFile.string();
meta["jsonout"] = c.jsonout.string();
meta["outfile"] = c.outfile.string();
meta["genome"] = c.genome.string();
meta["bamFile"] = c.bamFile.string();
meta["sampleName"] = c.sampleName;
meta["rgname"] = c.rgname;
meta["minChrLen"] = c.minChrLen;
meta["secondary"] = c.secondary;
meta["supplementary"] = c.supplementary;
meta["isHaplotagged"] = c.isHaplotagged;
meta["isMitagged"] = c.isMitagged;
meta["nXChrLen"] = c.nXChrLen;
meta["ignoreRG"] = c.ignoreRG;
meta["singleRG"] = c.singleRG;
rfile << "\"meta\":" << meta.dump() << ',';

rfile << "\"samples\":[";
nlohmann::json sp;
sp["id"] = c.sampleName;

Expand Down

0 comments on commit 74c6a31

Please sign in to comment.