How to open .SW files on Windows
To open .SW files on Windows, identify the file type: if it opens as readable text with protein annotations/records, treat it as UniProt/Swiss-Prot; if it sounds like audio or comes from an audio workflow, treat it as raw PCM audio.
Step-by-step instructions
- Identify the file type: if it opens as readable text with protein annotations/records, treat it as UniProt/Swiss-Prot; if it sounds like audio or comes from an audio workflow, treat it as raw PCM audio.
- For Swiss-Prot/UniProt flat files: open in a text editor for viewing, or parse it with a bioinformatics toolkit such as Biopython (format name commonly referred to as “swiss”).
- For raw PCM audio: use an audio tool that supports importing “Raw” data and manually set signed 16-bit PCM plus the correct sample rate and channels.
Common issues
The .sw file opens as “unknown” or with the wrong app
The .sw extension is ambiguous (Swiss-Prot/UniProt data vs raw PCM audio), and OS file associations may map it to a Swiss-Prot MIME type even when the content is different.
- Open a copy in a plain text editor: UniProt/Swiss-Prot flat files are readable text records; raw PCM audio will not look like structured text.
- If it is Swiss-Prot/UniProt text, process it with a UniProt-aware parser such as Biopython’s SwissProt/“swiss” support; if it is audio, import it as raw PCM in an audio tool and set parameters manually.
Raw .sw audio plays as noise or at the wrong speed
Raw PCM has no header, so the player cannot know the sample rate, number of channels, or exact encoding; incorrect settings produce noise, distortion, or wrong playback speed.
- Re-import the file as raw audio and confirm it is signed 16-bit PCM (as documented for .sw audio).
- Try the correct sample rate/channels from the source workflow; if unknown, test common sample rates (e.g., 44100 or 48000 Hz) and mono vs stereo until it sounds right.
Bioinformatics parser fails or stops mid-file
Swiss-Prot/UniProt flat files are structured records; truncation or non-conformant formatting can cause parsers to error.
- Verify the download/transfer completed and the file is not truncated.
- Validate against UniProt’s flat file format documentation and re-export/re-download from the original source if possible.
Linux shows MIME type chemical/x-swissprot but the file is not UniProt data
On Linux, shared-mime-info can associate extensions with MIME types using installed rules; this is extension-based and may not reflect the actual content.
- Inspect the file content (text vs binary) rather than relying on the MIME label alone.
- If needed, open it with an app that lets you explicitly choose “import raw audio” or “open as text,” depending on what the file actually contains.
Security note
Swiss-Prot/UniProt flat files are plain text data, but treat them as untrusted input for scripts and parsers: a malformed file can trigger bugs or excessive resource use in downstream tooling (e.g., parsers).