Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • foolishbrat
    Member
    • Nov 2008
    • 45

    Problem Converting BAM to SAM on to Amazon S3 Using Samtools

    In my Amazon EC2 instance I have the following:

    Code:
    ubuntu@ip-133-31-16-230:~$ df -h
    Filesystem       Size  Used Avail Use% Mounted on
    udev              79G     0   79G   0% /dev
    tmpfs             16G  8.8M   16G   1% /run
    /dev/xvda1       985G  136G  809G  15% /
    tmpfs             79G     0   79G   0% /dev/shm
    tmpfs            5.0M     0  5.0M   0% /run/lock
    tmpfs             79G     0   79G   0% /sys/fs/cgroup
    tmpfs             16G     0   16G   0% /run/user/1000
    bar-something  1.0P     0  1.0P   0% /home/ubuntu/bar-something-data
    bar-foolishbrat  1.0P     0  1.0P   0% /home/ubuntu/bar-foolisbrat-data
    The last two file system `bar-bi` and `bar-foolishbrat` are Amazon S3 bucket,
    mounted with the following command:

    Code:
    /home/ubuntu/go/bin/goofys bar-foolishbrat bar-foolishbrat-data
    /home/ubuntu/go/bin/goofys bar-somehting bar-something-data
    # Here we use Goofys. It can be achieved also with S3FS.
    Now I have no problem doing this, in my instance

    Code:
    samtools view -h ~/bar-something-data/myfile.bam > test.sam
    That is writing the SAM file in my instance file system. But when I do this, namely writing to the mounted S3:

    Code:
    samtools view -h ~/bar-something-data/myfile.bam > ~/bar-something-data/test.sam
    It gave the following error:

    Code:
    samtools: writing to standard output failed: Invalid argument
    samtools: error closing standard output: -1
    How can I resolve this issue? Is there any other tool for converting BAM to SAM other than samtools?
    Last edited by foolishbrat; 02-20-2017, 05:35 PM.
  • gringer
    David Eccles (gringer)
    • May 2011
    • 845

    #2
    Is there any other tool for converting BAM to SAM other than samtools?
    Ignoring the obvious "... why?"

    Probably, but why would you want to use a spoon to dig yourself out of a hole when the excavator is still there?

    The most recent versions of the samtools packages allow writing directly to files ('-o <fileName>'), which may fix the output redirect issue you have. I don't know for sure, because I've never played around with EC2.

    Comment

    Latest Articles

    Collapse

    • GATTACAT
      Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
      by GATTACAT
      Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
      07-01-2026, 11:43 AM
    • SEQadmin2
      Nine Things a Sample Prep Scientist Thinks About Before Sequencing
      by SEQadmin2


      I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

      Here are nine questions we think about, in roughly the order they matter, before...
      06-18-2026, 07:11 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, Yesterday, 11:05 AM
    0 responses
    7 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 07-02-2026, 11:08 AM
    0 responses
    28 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 06-30-2026, 05:37 AM
    0 responses
    27 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 06-26-2026, 11:10 AM
    0 responses
    27 views
    0 reactions
    Last Post SEQadmin2  
    Working...