Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: adds transformer #161

Merged
merged 2 commits into from
Nov 22, 2017
Merged

ENH: adds transformer #161

merged 2 commits into from
Nov 22, 2017

Conversation

gregcaporaso
Copy link
Member

SingleLanePerSampleSingleEndFastqDirFmt -> QIIME1DemuxDirFmt

@thermokarst thermokarst added the stat:DO-NOT-MERGE Please do not merge this until this label has been removed. label Nov 21, 2017
SingleLanePerSampleSingleEndFastqDirFmt -> QIIME1DemuxDirFmt
@gregcaporaso gregcaporaso removed the stat:DO-NOT-MERGE Please do not merge this until this label has been removed. label Nov 21, 2017
Copy link
Contributor

@thermokarst thermokarst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gregcaporaso, one minor change requested inline. Thanks!

filename = r[1]['filename']
if re.search("\s", sample_id) is not None:
raise ValueError(
"Sample identifers cannot contain space characters, but "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about something along these lines:

Whitespace was found in the ID for sample %s. Sample identifiers with whitespace are incompatible with FASTQ - please remove the whitespace and try again.

"an identifier with spaces was found: %s" % sample_id)
fq_reader = skbio.io.read('%s/%s' % (str(dirfmt), filename),
format='fastq', constructor=skbio.DNA,
phred_offset=33, verify=False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -0,0 +1,5 @@
# Quantitative Insights Into Kneecaps and Armpits
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gross.

sample-id,filename,direction
Human-Kneecap,Human-Kneecap_S1_L001_R1_001.fastq.gz,forward
# tab in sample-id
Human-Armp it,Human-Armpit_S2_L001_R1_001.fastq.gz,forward
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

'data/absolute_manifests/*',
'data/relative_manifests/*',
'data/qiime1-demux-format/*',
'data/single-end-two-sample-data1/*',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

absolute=False)

result = QIIME1DemuxDirFmt()
fp = os.path.join(str(result), 'seqs.fna')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to change this, but you can also use the operator overloading support with this object:

fp = result / 'seqs.fna'

It will handle sticking in the right path separator. I wouldh't worry about making that change, just more of a neat "TIL" type of thing.

@thermokarst thermokarst merged commit 2aed945 into qiime2:master Nov 22, 2017
@gregcaporaso gregcaporaso deleted the demux-transformers branch November 22, 2017 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants