Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #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


    • #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


      • #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


        • #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


          • #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


            • #21
              Hi got it ,
              Thanks

              Anusha.Ch

              Comment

              Latest Articles

              Collapse

              • seqadmin
                Current Approaches to Protein Sequencing
                by seqadmin


                Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                04-04-2024, 04:25 PM
              • seqadmin
                Strategies for Sequencing Challenging Samples
                by seqadmin


                Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                03-22-2024, 06:39 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, 04-11-2024, 12:08 PM
              0 responses
              27 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-10-2024, 10:19 PM
              0 responses
              30 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-10-2024, 09:21 AM
              0 responses
              26 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-04-2024, 09:00 AM
              0 responses
              52 views
              0 likes
              Last Post seqadmin  
              Working...
              X