-
Notifications
You must be signed in to change notification settings - Fork 40
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
Conversation
SingleLanePerSampleSingleEndFastqDirFmt -> QIIME1DemuxDirFmt
There was a problem hiding this 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 " |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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/*', |
There was a problem hiding this comment.
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') |
There was a problem hiding this comment.
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.
SingleLanePerSampleSingleEndFastqDirFmt -> QIIME1DemuxDirFmt