Tomcxf / FASTdRNA

FASTdRNA is a workflow for analysis of ONT direct RNA seq dataset
MIT License
2 stars 1 forks source link

Regarding FASTdRNA #2

Closed PRIYANKA-22091995 closed 6 months ago

PRIYANKA-22091995 commented 1 year ago

Hello Team,

I have a basic query regarding the tool, to run the command for the alternative splicing, do i always need a two samples with duplicates as well. Because i was planning to run the alternative splicing command as i only have one sample without duplicates.It would be nice to have your insights on the same.

Thanks & Regards Priyanka Roy

Tomcxf commented 11 months ago

Hi Priyanka, Sorry to reply so late. That's OK if you don't have duplicates. The pipeline will also work. The only difference may be that it will not have p-value. Best wishes!

Tomcxf commented 11 months ago

I have updated the code, called dRNAas_single.py. Below is my discussion with Suppa's developer, how can help you! https://github.com/comprna/SUPPA/issues/147 If there's any problems and error, please tell me :)

PRIYANKA-22091995 commented 11 months ago

Thanks for your response, this will be really helpful for my analysis. For running the alternative splicing, i have to first run following command first, so as to proceed with alternative splicing command. snakemake -s {dRNAmain.py} -s the snakemake file you want to run --cores / -c : the number of cores to use (necessary) --set-threads myrule=XXX set threads XXX for running

But, the only question i have is where should i provide the input file in the above command. Looking forward to your reply.

Thanks & Regards Priyanka Roy

Tomcxf commented 11 months ago

OK, you can add your input file information at the file called configForModifAS.yaml. Since you don't have duplications, you can just fill the information of ref , S1R1, S2R1. I also change details of dRNAas_single.py, hope it can help you!

PRIYANKA-22091995 commented 11 months ago

Thank you so much for the information. I want to clarify one more information i.e.

I only have one sample to run, so for my analysis, it is only S1R1. Will that work with the pipeline?

Thanks & Regards Priyanka Roy

On Fri, Dec 15, 2023 at 2:53 PM Tomcxf @.***> wrote:

OK, you can add your input file information at the file called configForModifAS.yaml https://github.com/Tomcxf/FASTdRNA/blob/main/configForModifAS.yaml. Since you don't have duplications, you can just fill the information of ref , S1R1, S2R1. I also change details of dRNAas_single.py, hope it can help you!

— Reply to this email directly, view it on GitHub https://github.com/Tomcxf/FASTdRNA/issues/2#issuecomment-1857548535, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2FSZXRIANSEV332V7WTLGTYJQJKZAVCNFSM6AAAAAA7HCSI5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJXGU2DQNJTGU . You are receiving this because you authored the thread.Message ID: @.***>

-- The information contained in this electronic communication is intended solely for the individual(s) or entity to which it is addressed. It may contain proprietary, confidential and/or legally privileged information. Any review, retransmission, dissemination, printing, copying or other use of, or taking any action in reliance on the contents of this information by person(s) or entities other than the intended recipient is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us by responding to this email or telephone and immediately and permanently delete all copies of this message and any attachments from your system(s). The contents of this message do not necessarily represent the views or policies of BITS Pilani.

Tomcxf commented 11 months ago

yes, it will run. you can change dRNAas_single.py. add '#' to whole 'rule PSI_Con2' and line16.

ArnavBharti commented 11 months ago

I am trying to do alternative splicing with one sample and no duplicates.

  1. I got an error while running the program:

    Building DAG of jobs...
    ChildIOException:
    File/directory is a child to another output:
    ('/home/.../FASTdRNA/AlternativeSplicing/localAS', generateEvents)
    ('/home/.../FASTdRNA/AlternativeSplicing/localAS/Condition1', PSI_Con1)
  2. Changes to dRNAas_single.py

    • Logs
    • Commented line 16 according to above conversation,
    • Commented lines 61-68 according to above conversation,
    • Changed extension to .smk for VS Code Snakemake linter to work,
    • Replaced ":" with ":" in lines 31, 58 (The character U+ff1a ":" could be confused with the ASCII character U+003a ":", which is more common in source code.)
    • Replaced config.yaml with configForModifAS.yaml (line 10)
    • line 80 column 1 replaced "3" with "#"
    • Uncommented line 9
    • Uncommented line 4
    • Replaced "RGF" with config["ref"] in line 9
    • Replaced "S1R1" with config["S1R1"] in line 4
    • Moved line 10 to line 4
##################################
# A pipeline for ONT_dRNA_seq written by Chen X.F
##################################
configfile: "configForModifAS.yaml"
S1R1=config["S1R1"]
#S1R2="S1R2"
#S2R1="S2R1"
#S2R2="S2R2"

ref=config["ref"]

#################################
rule all :
    input:  
        "AlternativeSplicing/localAS/Condition1",
        # "AlternativeSplicing/localAS/Condition2"

rule generateEvents:
    input:
        {ref}
    output:
        "AlternativeSplicing/localAS"
    shell:
        "mkdir AlternativeSplicing | mkdir AlternativeSplicing/localAS | suppa.py generateEvents -i {input} -o {output}/local -f ioe -e {SE,SS,MX,RI,FL}"

rule generateEvents2:
    input:
        "AlternativeSplicing/localAS"
    output:
        "AlternativeSplicing/localAS/allevents.ioe"
    shell:
        "awk 'FNR==1 && NR!=1 { while (/^<header>/) getline; } 1 {print}' {input}/*.ioe > output[0]"

#rule joinFilesCond1:
#    input:
        #{S1R1}
        #{S1R2}
#    output:
#        "AlternativeSplicing/localAS/Condition1"
#    shell:
#        "suppa.py joinFiles -f tpm -i {input[0]} {input[1]} -o {output}"

#rule joinFilesCond1:
#    input:
#        {S2R1}
#        {S2R2}
#    output:
#        "AlternativeSplicing/localAS/Condition2"
#    shell:
#        "suppa.py joinFiles -f tpm -i {input[0]} {input[1]} -o {output}"

rule PSI_Con1:
    input:
        "AlternativeSplicing/localAS/allevents.ioe",
        {S1R1}
    output:
        "AlternativeSplicing/localAS/Condition1"
    shell:
        "suppa.py psiPerEvent --ioe-file {input[0]} --expression-file {input[1]}.tpm -o {output}"

# rule PSI_Con2:
#     input:
#         "AlternativeSplicing/localAS/allevents.ioe",
#         {S2R1}
#     output:
#         "AlternativeSplicing/localAS/Condition2"
#     shell:
#         "suppa.py psiPerEvent --ioe-file {input[0]} --expression-file {input[1]}.tpm -o {output}"

#rule diffsplice:
#    input:
#        "AlternativeSplicing/localAS/allevents.ioe",
#        "AlternativeSplicing/localAS/Condition1",
#        "AlternativeSplicing/localAS/Condition2",
#        "AlternativeSplicing/localAS/Condition1",
#        "AlternativeSplicing/localAS/Condition2"
#    output:
#        "AlternativeSplicing/localAS/Con1vs2"
#    shell: 
#        "suppa.py diffSplice --method empirical --input {input[0]} --psi {input[1]}.psi {input[2]}.psi --tpm {input[3]}.tpm {input[4]}.tpm --area 1000 --lower-bound 0.05 -gc -o {output}"

#rule cluster:
#    input:
#        "AlternativeSplicing/localAS/Con1vs2"
#    output:
#        "AlternativeSplicing/localAS/cluster"
#    shell:
#        "suppa.py clusterEvents --dpsi {input}.dpsi --psivec {input}.psivec --sig-threshold 0.1 --eps 0.1 --min-pts 20 --groups 1-2,3-4 -o <output-file>" 

#rule trans_gE:
#    input:
#        {ref}
#    output:
#        "AlternativeSplicing/transcript"
#    shell:
#        "mkdir AlternativeSplicing/transcript | suppa.py generateEvents -i {input} -o {output}/local -f ioe -e {SE,SS,MX,RI,FL}"
  1. configForModifAS.yaml

    ref: /home/.../PlasmoDB-66_PvivaxP01_AnnotatedTranscripts.fasta
    S1R1: /home/.../FASTQ
  2. Commands ran:

    $ mamba activate FdR
    $ snakemake -s dRNAas_single.smk -c 2
Tomcxf commented 10 months ago

I am trying to do alternative splicing with one sample and no duplicates.

  1. I got an error while running the program:
Building DAG of jobs...
ChildIOException:
File/directory is a child to another output:
('/home/.../FASTdRNA/AlternativeSplicing/localAS', generateEvents)
('/home/.../FASTdRNA/AlternativeSplicing/localAS/Condition1', PSI_Con1)
  1. Changes to dRNAas_single.py
  • Logs

    • Commented line 16 according to above conversation,
    • Commented lines 61-68 according to above conversation,
    • Changed extension to .smk for VS Code Snakemake linter to work,
    • Replaced ":" with ":" in lines 31, 58 (The character U+ff1a ":" could be confused with the ASCII character U+003a ":", which is more common in source code.)
    • Replaced config.yaml with configForModifAS.yaml (line 10)
    • line 80 column 1 replaced "3" with "#"
    • Uncommented line 9
    • Uncommented line 4
    • Replaced "RGF" with config["ref"] in line 9
    • Replaced "S1R1" with config["S1R1"] in line 4
    • Moved line 10 to line 4
##################################
# A pipeline for ONT_dRNA_seq written by Chen X.F
##################################
configfile: "configForModifAS.yaml"
S1R1=config["S1R1"]
#S1R2="S1R2"
#S2R1="S2R1"
#S2R2="S2R2"

ref=config["ref"]

#################################
rule all :
    input:  
        "AlternativeSplicing/localAS/Condition1",
        # "AlternativeSplicing/localAS/Condition2"

rule generateEvents:
    input:
        {ref}
    output:
        "AlternativeSplicing/localAS"
    shell:
        "mkdir AlternativeSplicing | mkdir AlternativeSplicing/localAS | suppa.py generateEvents -i {input} -o {output}/local -f ioe -e {SE,SS,MX,RI,FL}"

rule generateEvents2:
    input:
        "AlternativeSplicing/localAS"
    output:
        "AlternativeSplicing/localAS/allevents.ioe"
    shell:
        "awk 'FNR==1 && NR!=1 { while (/^<header>/) getline; } 1 {print}' {input}/*.ioe > output[0]"

#rule joinFilesCond1:
#    input:
        #{S1R1}
        #{S1R2}
#    output:
#        "AlternativeSplicing/localAS/Condition1"
#    shell:
#        "suppa.py joinFiles -f tpm -i {input[0]} {input[1]} -o {output}"

#rule joinFilesCond1:
#    input:
#        {S2R1}
#        {S2R2}
#    output:
#        "AlternativeSplicing/localAS/Condition2"
#    shell:
#        "suppa.py joinFiles -f tpm -i {input[0]} {input[1]} -o {output}"

rule PSI_Con1:
    input:
        "AlternativeSplicing/localAS/allevents.ioe",
        {S1R1}
    output:
        "AlternativeSplicing/localAS/Condition1"
    shell:
        "suppa.py psiPerEvent --ioe-file {input[0]} --expression-file {input[1]}.tpm -o {output}"

# rule PSI_Con2:
#     input:
#         "AlternativeSplicing/localAS/allevents.ioe",
#         {S2R1}
#     output:
#         "AlternativeSplicing/localAS/Condition2"
#     shell:
#         "suppa.py psiPerEvent --ioe-file {input[0]} --expression-file {input[1]}.tpm -o {output}"

#rule diffsplice:
#    input:
#        "AlternativeSplicing/localAS/allevents.ioe",
#        "AlternativeSplicing/localAS/Condition1",
#        "AlternativeSplicing/localAS/Condition2",
#        "AlternativeSplicing/localAS/Condition1",
#        "AlternativeSplicing/localAS/Condition2"
#    output:
#        "AlternativeSplicing/localAS/Con1vs2"
#    shell: 
#        "suppa.py diffSplice --method empirical --input {input[0]} --psi {input[1]}.psi {input[2]}.psi --tpm {input[3]}.tpm {input[4]}.tpm --area 1000 --lower-bound 0.05 -gc -o {output}"

#rule cluster:
#    input:
#        "AlternativeSplicing/localAS/Con1vs2"
#    output:
#        "AlternativeSplicing/localAS/cluster"
#    shell:
#        "suppa.py clusterEvents --dpsi {input}.dpsi --psivec {input}.psivec --sig-threshold 0.1 --eps 0.1 --min-pts 20 --groups 1-2,3-4 -o <output-file>" 

#rule trans_gE:
#    input:
#        {ref}
#    output:
#        "AlternativeSplicing/transcript"
#    shell:
#        "mkdir AlternativeSplicing/transcript | suppa.py generateEvents -i {input} -o {output}/local -f ioe -e {SE,SS,MX,RI,FL}"
  1. configForModifAS.yaml
ref: /home/.../PlasmoDB-66_PvivaxP01_AnnotatedTranscripts.fasta
S1R1: /home/.../FASTQ
  1. Commands ran:
$ mamba activate FdR
$ snakemake -s dRNAas_single.smk -c 2

Thanks for your help to our project. I will check ChildIOException error as soon as possible, maybe it is due to the edit for request below. But I was also aware that '''S1R1: /home/.../FASTQ''' The S1R1 needs expression file (TPM generate from former process), not fastq files