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

How to read two fastq files simultaneously? #82

Open
yc-pro opened this issue Aug 9, 2024 · 1 comment
Open

How to read two fastq files simultaneously? #82

yc-pro opened this issue Aug 9, 2024 · 1 comment

Comments

@yc-pro
Copy link

yc-pro commented Aug 9, 2024

A single fastq file can be read as follows:
example:for name,seq,qual in pyfastx.Fastq('XXX.fq.gz')
But,If the sequencing data consists of a pair of PE files, how can they be read simultaneously?

@mr-eyes
Copy link

mr-eyes commented Oct 8, 2024

x = pyfastx.Fastq('XXX_R1.fq.gz')
y = pyfastx.Fastq('XXX_R2.fq.gz')

# Iterate over both sequences simultaneously
for (name1, seq1), (name2, seq2) in zip(x, y):
	# ...
	pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants