Skip to content

Commit

Permalink
Support FASTQ files with the censored1.fastq naming convention.
Browse files Browse the repository at this point in the history
Convert the Macintosh icon to a Windows icon.
  • Loading branch information
donkirkby committed Aug 20, 2015
1 parent 4d8212e commit 3ee80f9
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
14 changes: 14 additions & 0 deletions gui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
To create an icon, create a GIMP image with the [following sizes][sizes], then export as a .ico file with the listed colour settings for each layer.

- 256x256 will be saved as 32bpp 8bit alpha
- 48x48 will be saved as 32bpp 8bit alpha
- 48x48 will be saved as 8bpp 1bit alpha
- 32x32 will be saved as 32bpp 8bit alpha
- 32x32 will be saved as 8bpp 1bit alpha
- 32x32 will be saved as 4bpp 1bit alpha
- 16x16 will be saved as 32bpp 8bit alpha
- 16x16 will be saved as 8bpp 1bit alpha
- 16x16 will be saved as 4bpp 1bit alpha

[sizes]: http://stackoverflow.com/a/10819673/4794

Binary file removed gui/micall-icon.icns
Binary file not shown.
Binary file added gui/micall.ico
Binary file not shown.
Binary file added gui/micall.xcf
Binary file not shown.
13 changes: 8 additions & 5 deletions micall.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from micall.utils.externals import AssetWrapper, LineCounter
from micall.utils.sample_sheet_parser import sample_sheet_parser

fastq_re = re.compile('_L001_R[12]_001.fastq')
fastq_re = re.compile('(_L001_R[12]_001|.censored[12]).fastq')
sys.stdin = open(os.devnull, 'r') # Fixes a problem when Windows launches without a console.

files_to_collate = (('amino_frequencies.csv', '.amino.csv'),
Expand Down Expand Up @@ -195,13 +195,16 @@ def make_tree(self, path):


def process_sample(self, fastq1, progress, prefixes, image_paths, error_log):
fastq2 = fastq1.replace('_R1_001', '_R2_001')
fastq2 = fastq1.replace('_R1_001', '_R2_001').replace('censored1',
'censored2')
if not os.path.exists(fastq2):
raise IOError('ERROR: Missing R2 file for {}'.format(fastq1))

prefix = os.path.basename(fastq1).replace('_L001_R1_001.fastq', '')
prefix = os.path.basename(fastq1).replace('_L001_R1_001.fastq',
'').replace('.censored1.fastq',
'')
prefixes.append(prefix)
output_csv = fastq1.replace('_L001_R1_001.fastq', '.prelim.csv')
output_csv = prefix + '.prelim.csv'
self.write('Processing sample {} ({})\n'.format(prefix, progress))
with open(output_csv, 'wb') as handle:
prelim_map(fastq1,
Expand Down Expand Up @@ -333,7 +336,7 @@ def process_files(self):
prefix = filename.split('.')[0]
dest = os.path.join(self.workdir, filename)

if '_R1_001' in dest:
if '_R1_001' in dest or 'censored1' in dest:
self.target_files.append(dest.replace('.gz', ''))

# neither file type is present
Expand Down
3 changes: 2 additions & 1 deletion micall.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ exe = EXE(pyz,
debug=False,
strip=None,
upx=True,
console=False )
console=False,
icon='gui/micall.ico')

0 comments on commit 3ee80f9

Please sign in to comment.