# HG changeset patch # User jackcurragh # Date 1652875054 0 # Node ID 49e8fcbaaa72c01190ed4cfb59ab69559e86361c # Parent dfed3b7be399391812ef591af83b516befa13e56 Uploaded diff -r dfed3b7be399 -r 49e8fcbaaa72 create_ribosome_profile/bam_to_ribosome_profile.py --- a/create_ribosome_profile/bam_to_ribosome_profile.py Thu Apr 28 12:08:08 2022 +0000 +++ b/create_ribosome_profile/bam_to_ribosome_profile.py Wed May 18 11:57:34 2022 +0000 @@ -119,15 +119,20 @@ if __name__ == '__main__': bam_path = str(argv[1]) offset = int(argv[2]) - fasta_path = str(argv[3]) - mode = argv[4] - output = argv[5] + fasta_source = str(argv[3]) + fasta_path = str(argv[4]) + builtin = str(argv[5]) + mode = argv[6] + output = argv[7] if not os.path.exists(bam_path + ".bai"): print(bam_path) pysam.index(bam_path) - main(bam_path = bam_path, fasta_path = fasta_path, output=output, mode=mode, offset=offset) + if fasta_source == 'history': + main(bam_path = bam_path, fasta_path = fasta_path, output=output, mode=mode, offset=offset) + else: + main(bam_path = bam_path, fasta_path = builtin, output=output, mode=mode, offset=offset) diff -r dfed3b7be399 -r 49e8fcbaaa72 create_ribosome_profile/create_ribosome_profile.xml --- a/create_ribosome_profile/create_ribosome_profile.xml Thu Apr 28 12:08:08 2022 +0000 +++ b/create_ribosome_profile/create_ribosome_profile.xml Wed May 18 11:57:34 2022 +0000 @@ -1,13 +1,34 @@ - - Produce a sorted bed file from a sorted BAM file with the option of introducing an offset to the A-Site of a ribosome protected fragment. + + Produce a sorted bed file of A-Site profiles of RPFs. - biopython + biopython pysam - python $__tool_directory__/bam_to_ribosome_profile.py ${input1} ${input2} ${input3} ${input4} ${output1} + python $__tool_directory__/bam_to_ribosome_profile.py ${input1} ${input2} $refGenomeSource.genomeSource + #if $refGenomeSource.genomeSource == "builtin": + none ${refGenomeSource.input1_builtin.fields.path} ${input4} ${output1} + #else: + ${refGenomeSource.input1_file} none ${input4} ${output1} + #end if + + + + + + + + + + + + + + + + diff -r dfed3b7be399 -r 49e8fcbaaa72 create_ribosome_profile/tool-data/builtin_fastas.loc.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/create_ribosome_profile/tool-data/builtin_fastas.loc.sample Wed May 18 11:57:34 2022 +0000 @@ -0,0 +1,8 @@ +mus_musculus_m28 m28 Mus musculus (m28) Genome /data2/indices/bowtie/genome/mus_musculus_m28/mus_musculus_m28.fa +drosophila_melanogaster_dm6 dm6 Drosophila melanogaster (dm6) Genome /data2/indices/bowtie/genome/drosophila_melanogater_dm6/dm6.fa +sacCer_9 sacCer9 Saccharomyces cerevisiae (v9) Genome /data2/indices/bowtie/genome/sacCer_9/S288C_reference_sequence_R9-1-1_19990210.fsa +sarCer_3 sacCer3 Saccharomyces cerevisiae (v3) Genome /data2/indices/bowtie/genome/sacCer_3/S288C_reference_sequence_R3-1-1_19970730.fsa +E_coli_K12_MG1655 e_coli Escherichia coli (K12 MG1655) Genome /data2/indices/bowtie/genome/E_coli_K12_MG1655/GCF_003368535.1_ASM336853v1_genomic.fna +Arabidopsis araThal Arabidopsis thaliana (TAIR10) Genome /data2/indices/bowtie/genome/Arabidopsis/GCF_000001735.4_TAIR10.1_genomic.fna +homo_sapiens_hg19 hg19 Homo sapiens (hg19) Genome /data2/indices/bowtie/genome/homo_sapiens_hg19/hg19.fa +homo_sapiens_hg38 hg38 Homo sapiens (hg38) Genome /data2/indices/bowtie/genome/homo_sapiens_hg38/hg38.fa \ No newline at end of file diff -r dfed3b7be399 -r 49e8fcbaaa72 create_ribosome_profile/tool_data_table_conf.xml.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/create_ribosome_profile/tool_data_table_conf.xml.sample Wed May 18 11:57:34 2022 +0000 @@ -0,0 +1,8 @@ + + + + + value, dbkey, name, path + +
+
\ No newline at end of file