hiruna72 / squigualiser

Visualise and analyse nanopore (ONT) raw signals
https://hiruna72.github.io/squigualiser/
MIT License
100 stars 1 forks source link

pileup function for direct RNA seq data #29

Closed kaltinel closed 11 months ago

kaltinel commented 11 months ago

Hi,

I am trying to use the pile_up functionality, and my command line is as follows: ''' python plot_pileup.py --rna ${BASE_SHIFT} --region ${REGION} -f ${FASTA} -s ${SIGNAL} -a ${ALIGNMENT} -o ${OUTPUT} --tag_name "testcase-${TESTCASE}" ${PLOT_LIMIT} ${SCALING} ''' However, I receive an error of "Error: sam record does not have a 'si' tag."

Can I have your help on the matter?

Thank you!

hiruna72 commented 11 months ago

Hi @kaltinel,

Can you please use the dev branch to build squigualiser? Then please run test/data/raw/pipelines/pipeline_0/dna_r10.4.1_e8.2_400bps/run.sh pipeline after setting the appropriate variable as documented here. You should run the script while sitting inside the test/data/raw/pipelines/pipeline_0/dna_r10.4.1_e8.2_400bps directory.

Then we can see where the pipeline is failing and troubleshoot from there.

Thank you.

hasindu2008 commented 11 months ago

Could you check if you are using newer version of f5c with the correct -a option to generate the BAM file with the si tag?

kaltinel commented 11 months ago

Hi, Thank you for your replies.

1) @hiruna72 : I am using the dev branch, and all the test cases work. So it must be some issue related with my inputs. On this line, my kind suggestion would be to check the locations of the folders. For example, from src import X only works if the src is outside of the current script path. Otherwise python thinks it is a library itself. I am sure everyone can move the files a bit and make it work, so it is only a suggestion for improvement :)

2) @hasindu2008 Indeed, my f5c version doesn't have an -a option, however I thought I am using the latest version which is v1.3.

$ f5c-v1.3/f5c_x86_64_linux --version
F5C 1.3
hasindu2008 commented 11 months ago

@kaltinel The --sam option is equivalent to -a option and was introduced in version 1.3 as explained in https://github.com/hasindu2008/f5c/releases/tag/v1.3. Is it that -a gives as error in your case? Could you double-check if your commands are as in https://github.com/hiruna72/squigualiser/tree/dev#option-2-f5c-eventalign?

@hiruna72 we better update the doc that f5c >=1.3 is required for this

kaltinel commented 11 months ago

Thank you for your reply. Indeed option-a works well and I am able to create .samfile as output withf5c v1.3.

However that sam file (the output of f5c eventalign) wasn't BGZF compressed, therefore could not be indexed after sorting. For this reason, I did sam --> bam --> sorted_bam --> indexed sorted bam, and used this indexed sorted bam as an alignment file for plot_pileup. I would be happy to know if there is a way to create BGZF compressed output of eventalign, or a shorter way to provide alignment input for plotting. Other than that, everything works perfectly, thanks for the tool & help.

hasindu2008 commented 11 months ago

@kaltinel the steps are:

ALIGNMENT=eventalign.bam
f5c eventalign -b ${MAP_SAM} -r ${FASTQ} -g ${REF} --slow5 ${SIGNAL} -a -o eventalign.sam
samtools sort eventalign.sam -o ${ALIGNMENT}
samtools index ${ALIGNMENT}

The samtools sort command will make it BAM automatically if the output file is .bam.

@hiruna72 Please fix the issue with this file location as well as inconsistencies/missing versions etc on the documentation.