Challenge: Analyze Read Quality
Swipe to start coding
Write a Python function that processes sequencing read data in FASTQ format to assess read quality. The function should take a list of FASTQ lines and a quality threshold, and return the count of reads with an average quality score above the threshold.
- Calculate the average quality score for each read using the quality string (fourth line of each FASTQ record).
- Convert ASCII characters in the quality string to Phred scores using Sanger encoding (
ord(char) - 33). - Count how many reads have an average quality score greater than the provided threshold.
- Return the count of such reads.
Oplossing
Bedankt voor je feedback!
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Can you explain this in simpler terms?
What are the main takeaways from this?
Can you give me a real-world example?
Geweldig!
Completion tarief verbeterd naar 6.25
Challenge: Analyze Read Quality
Veeg om het menu te tonen
Swipe to start coding
Write a Python function that processes sequencing read data in FASTQ format to assess read quality. The function should take a list of FASTQ lines and a quality threshold, and return the count of reads with an average quality score above the threshold.
- Calculate the average quality score for each read using the quality string (fourth line of each FASTQ record).
- Convert ASCII characters in the quality string to Phred scores using Sanger encoding (
ord(char) - 33). - Count how many reads have an average quality score greater than the provided threshold.
- Return the count of such reads.
Oplossing
Bedankt voor je feedback!
single