bcgsc / NanoSim

Nanopore sequence read simulator
Other
233 stars 56 forks source link

reads did not aligned to 3' end #101

Open yhg926 opened 3 years ago

yhg926 commented 3 years ago

Here is my command to simulated reads: ./simulator.py transcriptome -rt /data/hgyi/work/RNAseq_quantTool/Homo_sapiens.GRCh38.cdna.all.fa -c ../pre-trained_models/human_NA12878_dRNA_Bham1_guppy/training -e ../pre-trained_models/human_NA12878_dRNA_Bham1_guppy/expression_abundance.tsv -n 100000 --no_model_ir.

I found most of reads simulated did not aligned to (not even close to) 3' end of the transcript they originated. what is the model you used to simulate reads origin position ? Many thanks.

SaberHQ commented 3 years ago

Dear @yhg926 ,

In the characterization phase, NanoSim records the relative length of nanopore reads over the reference transcripts they are aligned to (It creates a two dimensional kernal density function). In the simulation phase, after a reference transcript is selected for simulation based on expression profile, it looks into the KDE function and selects a nanopore read length to be simulated out of that particular transcript.

The start position of the nanopore read inside the reference transcript is a random position between start of the transcript and end of transcript minus the nanopore read length to be extracted (so it covers any part of the transcript). We know it is not optimal way to extract reads and we may improve this in upcoming versions by truly modeling it. However, I doubt that it is the reason for what you reported.

Please also note that nanopore reads have lower quality at both ends (head and tail regions) and even if you have a full length read that covers the whole transcript, its quality in 3' and 5' ends will be lower and parts of it may not align well to reference transcripts using alignment tools.

I hope I answered your question. Please feel free to ask for more clarification.

CDieterich commented 2 years ago

Same problem over here for direct RNA-seq. Running NanoSim3.0.2

image

EEF1A1 is on the minus strand.. I would expect a 3'end read bias, but see an increased coverage at the 5'end.

CDieterich commented 2 years ago

Top 2 tracks are from NanoSim