Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

genome.info is empty #17

Closed
Maarten-vd-Sande opened this issue Aug 9, 2019 · 2 comments
Closed

genome.info is empty #17

Maarten-vd-Sande opened this issue Aug 9, 2019 · 2 comments

Comments

@Maarten-vd-Sande
Copy link

Maarten-vd-Sande commented Aug 9, 2019

When I use the command you provided to generate the genome.info I end up with an empty genome.info. These are the first couple lines of the bam file:

samtools view -H /vol/atacpipeline/dedup/GSM2837484-Bl71nemr.bam | head
@HD	VN:1.5	SO:coordinate
@SQ	SN:FLLO01000001.1	LN:10571537
@SQ	SN:FLLO01000002.1	LN:9833161
@SQ	SN:FLLO01000003.1	LN:8797521
@SQ	SN:FLLO01000004.1	LN:8740412
@SQ	SN:FLLO01000005.1	LN:8020686
@SQ	SN:FLLO01000006.1	LN:7953648
@SQ	SN:FLLO01000007.1	LN:7634011
@SQ	SN:FLLO01000008.1	LN:7394200
@SQ	SN:FLLO01000009.1	LN:6209474

And when I run this no output is generated:

samtools view -H /vol/atacpipeline/dedup/GSM2837484-Bl71nemr.bam| perl -ne 'if(/^@SQ.*?SN:(\w+)\s+LN:(\d+)/){print $1,"\t",$2,"\n"}'
perl -v
This is perl 5, version 26, subversion 2 (v5.26.2) built for x86_64-linux-thread-multi 
...

What am I doing wrong?

@EvanTarbell
Copy link
Collaborator

Thanks for the comment and for using our tool.
You can try this command as well:

$ samtools view -H ExampleFile.sorted.bam | grep SQ | cut -f 2-3 | cut -d ':' -f 2 | cut -f 1 > tmp
$ samtools view -H ExampleFile.sorted.bam | grep SQ | cut -f 2-3 | cut -d ':' -f 2,3 | cut -d ':' -f 2 > tmp2
$ paste tmp tmp2 > genome.info; rm tmp tmp2

Let me know if that works.

@Maarten-vd-Sande
Copy link
Author

Yes that works. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants