Hi Keiran, I don’t think so. As far as I know, samtools view is only used to convert (or view) SAM<->BAM<->CRAM. However, the file must not be sorted, while indexing implies that the file is sorted. I’d use ‘samtools view’ to convert the file if necessary, sort it using ‘samtools sort’ and then ‘samtools index -c’ to index the resulting file.
Best, Sergej Dr. Sergej Nowoshilow Post-doc in Tanaka Lab Elly Tanaka group, IMP Animal models of regeneration email: sergej.nowoshi...@imp.ac.at phone: +43 (0) 1 79730 3203 orcid: 0000-0001-8360-5010<https://orcid.org/0000-0001-8360-5010> IMP Research Institute of Molecular Pathology Campus-Vienna-BioCenter 1 1030 Vienna, Austria Part of Vienna BioCenter www.viennabiocenter.org This message is confidential and may contain privileges information. It is intended for the named recipients only. If you receive it in error please notify me and permanently delete the original message and any copies. Von: Keiran Raine <k...@sanger.ac.uk> Datum: Samstag, 13. Juni 2020 um 20:16 An: "samtools-help@lists.sourceforge.net" <samtools-help@lists.sourceforge.net> Betreff: [Samtools-help] --write-index - csi? Hi, Is it possible to write a csi index when using samtools view? I can't see anything in the --output-fmt* section relating to index format. Thanks, Keiran Raine, M.Sc., MBCS Principal Software Developer Cancer, Ageing and Somatic Mutation Wellcome Sanger Institute k...@sanger.ac.uk<mailto:k...@sanger.ac.uk> Office: D3-19 Ext: 4983 Please note that due to childcare requirements during the Covid lockdown I am generally not available after 4pm. -- The Wellcome Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
_______________________________________________ Samtools-help mailing list Samtools-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/samtools-help