Region "Awk" Specifies An Unknown Reference Name
1
0
Entering edit mode
13.1 years ago
Zhshqzyc ▴ 520

Hello, can you look at what is wrong by using samtools command?

#!bin/bash
samtools view  -o raw_genome.txt my.bam awk '{print $3, $4, $10;}' \
raw_genome.txt >raw_sequence.txt

What I got is

[main_samview] region "awk" specifies an unknown reference name. Continue anyway.

[mainsamview] region "{print $3, $4, $10;}" specifies an unknown reference name. Continue anyway. [mainsamview] region "raw_genome.txt" specifies an unknown reference name. Continue anyway.

Thanks

samtools • 3.1k views
ADD COMMENT
3
Entering edit mode
13.1 years ago
Pasta ★ 1.3k

Add a pipe "|" and remove the -o option and do something like that:

samtools view my.bam | awk '{print $3, $4, $10;}' > Raw_File.txt

The pipe will redirect the output of your first command to the next command

ADD COMMENT

Login before adding your answer.

Traffic: 1877 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6