GoekeLab / m6anet

Detection of m6A from direct RNA-Seq data
https://m6anet.readthedocs.io/
MIT License
101 stars 17 forks source link

How do I get the files in the 'm6Anet requires eventalign.txt from nanopolish' step? #77

Closed king-wang-cmd closed 1 year ago

king-wang-cmd commented 1 year ago

Hello, I want to detect m6A modifications from my direct RNA sequencing sample.When I look at 'https://m6anet.readthedocs.io/en/latest/quickstart.html#quickstart' page, 'm6Anet requires eventalign.txt from nanopolish' (nanopolish eventalign --reads reads.fastq --bam reads.sorted.bam --genome transcript.fa --scale-events --signal-index --summary /path/to/summary.txt --threads 50 > /path/to/eventalign.txt) The files required for the code in this step are not well understood. How do the 'reads.sorted.bam', 'transcript.fa' and '/path/to/summary.txt' in this line of code get? Can you provide sample file information?

Looking forward to receiving your reply.

Thanks.

Xiao tong

tjprins commented 1 year ago

Using your raw data (.fast5 files), your basecalled data (.fastq files), and your aligned data to the transcriptome (.bam files), you need to run nanopolish index and nanopolish eventalign before running m6ANet. (The .fastq files are generated from your raw .fast5 data using a basecalling algorithm (such as Guppy). The aligned data is generated from the basecalled data and a reference transcriptome using a command line alignment tool, such as minimap2.)

For example, let's say I have all of my files in the root folder on a linux machine /home/$USER/ in subfolders labeled "raw" (.fast5 data), "basecalled" (.fastq data), "aligned" (.bam data), and "reference" (.fna reference transcriptome). I would run nanopolish index like so:

cd /home/$USER/basecalled nanopolish index -d /home/$USER/raw basecalled_master_file.fastq

Then, I would run eventalign:

nanopolish eventalign -r basecalled_master_file.fastq -b /home/$USER/aligned/aligned_file.bam -g /home/$USER/reference/transcriptome_file.fna --scale-events --signal-index --threads 50 > eventalign.txt

This would generate the eventalign text file in the same folder as your .fastq file, which you can then feed into m6ANet. More information on those steps can be found in the nanopolish documentation. Note that $USER here would automatically be substituted by your username in the shell, so no need to change it.