-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from arteria-project/devel
Merge devel branch for new release
- Loading branch information
Showing
9 changed files
with
104 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "1.1.0" | ||
__version__ = "1.1.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
|
||
class Bcl2FastqLogFileProvider: | ||
|
||
def __init__(self, config): | ||
self.config = config | ||
|
||
def log_file_path(self, runfolder): | ||
log_base_path = self.config["bcl2fastq_logs_path"] | ||
log_file = "{0}/{1}.log".format(log_base_path, runfolder) | ||
return log_file | ||
|
||
def get_log_for_runfolder(self, runfolder): | ||
log_path = self.log_file_path(runfolder) | ||
with open(log_path) as f: | ||
file_content = f.read() | ||
return file_content | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
jsonpickle==0.9.2 | ||
tornado==4.2.1 | ||
git+https://github.com/johandahlberg/localq.git@with_shell_true # Get from pip in future - localq | ||
git+https://github.com/arteria-project/arteria-core.git@v1.0.0#egg=arteria-core | ||
git+https://github.com/arteria-project/arteria-core.git@v1.0.1#egg=arteria-core | ||
illuminate==0.6.2 | ||
pandas==0.14.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
import unittest | ||
from mock import MagicMock, patch, mock_open | ||
|
||
from bcl2fastq.lib.bcl2fastq_logs import Bcl2FastqLogFileProvider | ||
|
||
class TestBcl2FastqLogFileProvider(unittest.TestCase): | ||
|
||
fake_file_content = """ | ||
This is a nice multi-line | ||
string for | ||
you | ||
my friend | ||
""" | ||
fake_path = "/fake/path" | ||
mock_config = MagicMock() | ||
mock_config.__getitem__.return_value = fake_path | ||
runfolder = "160218_ST-E00215_0070_BHKGLFCCXX" | ||
|
||
log_filer_provider = Bcl2FastqLogFileProvider(mock_config) | ||
|
||
def test_log_file_path(self): | ||
log_file = self.log_filer_provider.log_file_path(self.runfolder) | ||
self.assertEqual(log_file, "{}/{}.log".format(self.fake_path, self.runfolder)) | ||
|
||
def test_get_log_for_runfolder(self): | ||
with patch("__builtin__.open", mock_open(read_data=self.fake_file_content), create=True): | ||
file_content = self.log_filer_provider.get_log_for_runfolder(self.runfolder) | ||
self.assertEqual(file_content, self.fake_file_content) | ||
|
||
def test_get_log_for_runfolder_does_not_exist(self): | ||
with self.assertRaises(IOError): | ||
self.log_filer_provider.get_log_for_runfolder(self.runfolder) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters