Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regarding FASTdRNA #2

Closed
PRIYANKA-22091995 opened this issue Nov 11, 2023 · 8 comments
Closed

Regarding FASTdRNA #2

PRIYANKA-22091995 opened this issue Nov 11, 2023 · 8 comments

Comments

@PRIYANKA-22091995
Copy link

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
Copy link
Owner

Tomcxf commented Dec 12, 2023

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
Copy link
Owner

Tomcxf commented Dec 12, 2023

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

@PRIYANKA-22091995
Copy link
Author

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
Copy link
Owner

Tomcxf commented Dec 15, 2023

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
Copy link
Author

PRIYANKA-22091995 commented Dec 15, 2023 via email

@Tomcxf
Copy link
Owner

Tomcxf commented Dec 18, 2023

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

@ArnavBharti
Copy link

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

@Tomcxf
Copy link
Owner

Tomcxf commented Jan 3, 2024

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

@Tomcxf Tomcxf closed this as completed Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants