Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AnushaC
    Member
    • Sep 2013
    • 78

    #16
    Hi All,
    anusha@cn1:/raid/development/anusha/python_test/shelltest> cat SRAtoBAM_BN_cp1.sh
    #bin/bash
    #basename /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203400/SRR203400.sra
    find $1
    basename $1anusha@cn1:/raid/development/anusha/python_test/shelltest> ./SRAtoBAM_BN_cp1.sh /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203400
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203400/SRR203400.sra
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203401
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203401/SRR203401.sra
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203402
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203402/SRR203402.sra
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203403
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203403/SRR203403.sra
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203404
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203404/SRR203404.sra
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203405
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203405/SRR203405.sra
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203406
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203406/SRR203406.sra
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203407
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203407/SRR203407.sra
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203408
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203408/SRR203408.sra
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203409
    /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/SRR203409/SRR203409.sra
    SRX062364
    I am trying to pipe so that i will get sra name find $1 - | basename $1

    Thanks in advance,
    Anusha.Ch

    Comment

    • AnushaC
      Member
      • Sep 2013
      • 78

      #17
      HI aLL,
      #find $1
      #basename $1
      #find $1 -type f -print0 | xargs -0 -n1 basename
      find -L $1 -type f -print0 | xargs -n1 basename
      I was using like this . i am getting like this
      xargs: WARNING: a NUL character occurred in the input. It cannot be passed through in the argument list. Did you mean to use the --null option?
      SRR203400.sra
      more over how can get all the sra files without hardcoding anything

      Thanks in advance,
      Anusha.Ch

      Comment

      • rhinoceros
        Senior Member
        • Apr 2013
        • 372

        #18
        How about you post your code so that you have commented each line separately (what you think it does) so that we might get some idea of what you're trying to do?
        savetherhino.org

        Comment

        • AnushaC
          Member
          • Sep 2013
          • 78

          #19
          Hi All,
          Here is my problem -- I wrote two shell scripts one for getting all the sra files in given directory ,one for converting from sam file to bam file . Both are working fine but I am getting confused how to pipe my all sra input second program which converts to bam file

          This is my first program
          #bin/bash
          #finding the given sra files in directories and subdirectories and outputing them
          find -L $1 -type f -print0 | xargs --null -n1 basename

          give me output like this

          anusha@cn1:/raid/development/anusha/python_test/shelltest> ./SRAtoBAM_BN_cp1.sh /raid/databases/ROADMAP/DGF/ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX062/SRX062364/
          SRR203400.sra
          SRR203401.sra
          SRR203402.sra
          SRR203403.sra
          SRR203404.sra
          SRR203405.sra
          SRR203406.sra
          SRR203407.sra
          SRR203408.sra
          SRR203409.sra
          now i want to all my sra file and pipe this program

          #!/bin/bash
          # Taking an SRA input and hg19 reference into variables
          sraip=$1
          hg19ref=$2
          # generating shell pipeline
          # 1) using fastq dump to generate fastq file given sra input
          #2) using bowtie to map the fastq file to given reference genome
          #3) using samtools view to generate bam file from the given sam file
          fastq-dump -Z $1 | bowtie -v 3 -k 2 --sam $2 - | samtools view -bS -o $3 -

          which converts from sra to bam format

          Thanks very much in advance,
          Anusha.Ch

          Comment

          • rhinoceros
            Senior Member
            • Apr 2013
            • 372

            #20
            Your first script returns a list of filenames, how could your second script know where these files are? One solution would be to make your first script write the full paths of your files to some file and then in the second script you go through that file line by line. Something like:

            Code:
            while read line
            do 
            something with a $line
            done <yourInputListOfFilePaths.txt
            Last edited by rhinoceros; 10-12-2013, 02:34 AM.
            savetherhino.org

            Comment

            • AnushaC
              Member
              • Sep 2013
              • 78

              #21
              Hi got it ,
              Thanks

              Anusha.Ch

              Comment

              Latest Articles

              Collapse

              • SEQadmin2
                Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
                by SEQadmin2



                CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

                Despite this, “CRISPR helped turn genome editing from a specialized technique into
                ...
                07-31-2026, 11:01 AM
              • SEQadmin2
                Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
                by SEQadmin2


                Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

                The systematic characterization of the human proteome has
                ...
                07-20-2026, 11:48 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 08-13-2026, 12:22 PM
              0 responses
              20 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 08-11-2026, 10:35 AM
              0 responses
              16 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 08-06-2026, 07:41 AM
              0 responses
              32 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 08-03-2026, 10:13 AM
              0 responses
              50 views
              0 reactions
              Last Post SEQadmin2  
              Working...