Skip to content

Commit ddd77d1

Browse files
committed
Resolved merging conflicts.
2 parents 31662f3 + c89e411 commit ddd77d1

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@ script:
1515
- tests/structure_field_test.sh
1616
- tests/fastStructure_field_test.sh
1717
- tests/maverick_field_test.sh
18+
19+
# Other stuff
20+
notifications:
21+
email:
22+
23+

structure_threader/structure_threader.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ def runprogram(wrapped_prog, iterations):
6060
str(rep_num))
6161
cli = [arg.external_prog, "-K", str(K), "-i", arg.infile, "-o",
6262
output_file]
63+
if arg.params is not None:
64+
mainparams = arg.params
65+
extraparams = os.path.join(os.path.dirname(arg.params),
66+
"extraparams")
67+
cli += ["-m", mainparams, "-e", extraparams]
6368

6469
elif wrapped_prog == "maverick": # Run MavericK
6570
# This will break on non-POSIX OSes, but maverick requires a trailing /
@@ -226,7 +231,7 @@ def maverick_merger(outdir, k_list, tests):
226231
"""
227232
files_list = ["outputEvidence.csv", "outputEvidenceDetails.csv"]
228233
mrg_res_dir = os.path.join(outdir, "merged")
229-
os.makedirs(mrg_res_dir)
234+
os.makedirs(mrg_res_dir, exist_ok=True)
230235
log_evidence_ti = {}
231236

232237
def _mav_output_parser(filename, get_header):
@@ -249,7 +254,7 @@ def _ti_test(outdir, log_evidence_ti):
249254
Write a bestK result based in TI results.
250255
"""
251256
bestk_dir = os.path.join(outdir, "bestK")
252-
os.makedirs(bestk_dir)
257+
os.makedirs(bestk_dir, exist_ok=True)
253258
bestk = max(log_evidence_ti, key=log_evidence_ti.get).replace("K", "1")
254259
bestk_file = open(os.path.join(bestk_dir, "TI_integration.txt"), "w")
255260
output_text = ("MavericK's 'Thermodynamic Integration' test revealed "

tests/maverick_field_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# You should have received a copy of the GNU General Public License
1616
# along with structure_threader. If not, see <http://www.gnu.org/licenses/>.
1717

18-
# set -e
18+
set -e
1919

2020
LightGreen='\033[1;32m'
2121
NoColor='\033[0m'

tests/structure_field_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ echo "Runnig STRUCTURE 'field test'. This will simulate a full wrapped run on sm
2525
git_dir=`pwd`
2626
str_bin=`which structure`
2727

28-
~/virtualenv/python3.5/bin/structure_threader -i ${git_dir}/tests/smalldata/Reduced_dataset.structure -o ~/results -st ${str_bin} -K 3 -t 4 -R 5
28+
~/virtualenv/python3.5/bin/structure_threader -i ${git_dir}/tests/smalldata/Reduced_dataset.structure -o ~/results -st ${str_bin} -K 3 -t 4 -R 5 --params ${git_dir}/tests/smalldata/mainparams
2929

3030
echo -e "${LightGreen}STRUCTURE 'Field test' ran successfully. Yay!${NoColor}"

0 commit comments

Comments
 (0)